Python class as loss layer in Caffe.

An example showing how to use Python class as loss Layer in Caffe.
Conclusion of callback sequence:
initialization:
  1. => setup()
  2. => reshape()
training:
  1. => reshape()
  2. => forward()
  3. => backward()
notice:
remember to put pyloss.py in $PYTHONPATH, or just copy it to $CAFFE_HOME/python for convenience(make sure you had added it to $PYTHONPATH).