conx overview

The file conx.py implements a python library for experimenting with artificial neural networks. The file newConx.py adds better visualization capabilities to the original library. Feel free to look at the source code if you're interested in seeing how networks have been implemented.

In all of the examples below the network will be called n. In the Python interpreter, you can use the following methods:

  1. At the unix prompt do: python -i and-net.py. Before training, test the AND network's performance and look at its weights. Then train the network and re-test its performance and check out how the weights have changed. Do the weights make sense to you?
  2. At the unix prompt do: python -i or-net.py and try all of the same commands as before. Convince yourself that the weights make sense.
  3. Next run the file xor-net.py in the same way. When you train this network it will be unable to learn.

  4. Run the file xor-3layer.py. In this case the network has three layers (input, hidden, and output) instead of just two (input, output). To see all of the weights for this network requires two commands:
    • n.printWeights('input','hidden')
    • n.printWeights('hidden','output')
    After training this three-layer network, draw the network with all of the trained weights and biases and figure out how it is solving this problem.