Train a two-layer perceptron. You will find the Wikipedia article and these lecture slides useful.
Use a sigmoid activation function for both the hidden and output layers, $$\sigma(x) = \frac{1}{1 + e^{-x}}$$
Your function should take in a list or array of input/output pairs and an integer specifying how many training passes through the input set to make. Both the input and output will be vectors of any convenient representation in your language. You should output or otherwise initialize a classifier function or object.
Initialize the weights randomly and to prevent overflow/underflow, normalize the weight vectors after each update.
You should handle input data vectors up to 1000 dimensions and at least 10 output dimensions. The classifier function should return a vector of the activation levels of each of the outputs.
You may assume access to implementations of all of the BLAS routines.
The MNIST database has a very large training and test set you might find useful for testing purposes.
EDIT: Example dataset.
Input and output vectors (input).
Input Output [0,0] [0] [0,1] [1] [1,0] [1] [1,1] [0]
Your program should produce a classifier that takes in a vector of two elements and returns a vector of one element that has similar behavior as the input.