Lec7 - Ex:1 - "Perceptron-based multi-layer networks with hard thresholds and relative weights (without using learning)"

Did you remember to make the first column something unique in your call to get_records? Duplicate value '1' found in column 'activated'.
  • line 1291 of /lib/dml/mysqli_native_moodle_database.php: call to debugging()
  • line 1679 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
  • line 1752 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
  • line 1733 of /lib/dml/moodle_database.php: call to moodle_database->get_field_sql()
  • line 1712 of /lib/dml/moodle_database.php: call to moodle_database->get_field_select()
  • line 231 of /plagiarism/compilatio/lib.php: call to moodle_database->get_field()
  • line 48 of /plagiarism/compilatio/classes/compilatio/documentFrame.php: call to compilatio_enabled()
  • line 93 of /plagiarism/compilatio/lib.php: call to CompilatioDocumentFrame::get_document_frame()
  • line 48 of /lib/plagiarismlib.php: call to plagiarism_plugin_compilatio->get_links()
  • line 561 of /mod/forum/classes/local/exporters/post.php: call to plagiarism_get_links()
  • line 423 of /mod/forum/classes/local/exporters/post.php: call to mod_forum\local\exporters\post->get_message()
  • line 125 of /lib/classes/external/exporter.php: call to mod_forum\local\exporters\post->get_other_values()
  • line 155 of /mod/forum/classes/local/exporters/posts.php: call to core\external\exporter->export()
  • line ? of unknownfile: call to mod_forum\local\exporters\posts->mod_forum\local\exporters\{closure}()
  • line 157 of /mod/forum/classes/local/exporters/posts.php: call to array_map()
  • line 125 of /lib/classes/external/exporter.php: call to mod_forum\local\exporters\posts->get_other_values()
  • line 189 of /mod/forum/classes/local/builders/exported_posts.php: call to core\external\exporter->export()
  • line 95 of /mod/forum/classes/local/renderers/posts.php: call to mod_forum\local\builders\exported_posts->build()
  • line 212 of /mod/forum/classes/local/renderers/discussion.php: call to mod_forum\local\renderers\posts->render()
  • line 343 of /mod/forum/discuss.php: call to mod_forum\local\renderers\discussion->render()
Error: mdb->get_record() found more than one record!
  • line 1691 of /lib/dml/moodle_database.php: call to debugging()
  • line 1651 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
  • line 1630 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
  • line 160 of /plagiarism/compilatio/lib.php: call to moodle_database->get_record()
  • line 53 of /plagiarism/compilatio/classes/compilatio/documentFrame.php: call to compilatio_cm_use()
  • line 93 of /plagiarism/compilatio/lib.php: call to CompilatioDocumentFrame::get_document_frame()
  • line 48 of /lib/plagiarismlib.php: call to plagiarism_plugin_compilatio->get_links()
  • line 561 of /mod/forum/classes/local/exporters/post.php: call to plagiarism_get_links()
  • line 423 of /mod/forum/classes/local/exporters/post.php: call to mod_forum\local\exporters\post->get_message()
  • line 125 of /lib/classes/external/exporter.php: call to mod_forum\local\exporters\post->get_other_values()
  • line 155 of /mod/forum/classes/local/exporters/posts.php: call to core\external\exporter->export()
  • line ? of unknownfile: call to mod_forum\local\exporters\posts->mod_forum\local\exporters\{closure}()
  • line 157 of /mod/forum/classes/local/exporters/posts.php: call to array_map()
  • line 125 of /lib/classes/external/exporter.php: call to mod_forum\local\exporters\posts->get_other_values()
  • line 189 of /mod/forum/classes/local/builders/exported_posts.php: call to core\external\exporter->export()
  • line 95 of /mod/forum/classes/local/renderers/posts.php: call to mod_forum\local\builders\exported_posts->build()
  • line 212 of /mod/forum/classes/local/renderers/discussion.php: call to mod_forum\local\renderers\posts->render()
  • line 343 of /mod/forum/discuss.php: call to mod_forum\local\renderers\discussion->render()

Lec7 - Ex:1 - "Perceptron-based multi-layer networks with hard thresholds and relative weights (without using learning)"

di SYED FAHAD HASSAN -
Numero di risposte: 0

Perceptron-based multi-layer networks with hard thresholds and relative weights can be used to implement simple Boolean functions such as A and (not B), A xor B, etc.

  • For the function A and (not B), the network would have two input neurons, one for A and one for B, and one output neuron. The weights on the connections from the input neurons to the output neuron would be set such that if A is 1 and B is 0, the output will be 1 (A and (not B) is true), and if A is 0 or B is 1, the output will be 0 (A and (not B) is false).
  • For the function A xor B, the network would have two input neurons, one for A and one for B, and one output neuron. The weights on the connections from the input neurons to the output neuron would be set such that if A is 1 and B is 0 or A is 0 and B is 1, the output will be 1 (A xor B is true), and if A is 1 and B is 1 or A is 0 and B is 0, the output will be 0 (A xor B is false).

It's worth noting that this method of using relative weights and hard thresholds is a very simplistic approach to neural networks and is not commonly used in practice, as it doesn't allow for learning and generalization.

Here is the link to the Google Colab notebook where you can see the implementation:

https://colab.research.google.com/drive/1rvFwnJK5-IXlNaPa8JZaTdk1tmNMHyBc?usp=sharing