I am creating new type of loss function with my own weights and parameters for this loss function.
I would like to do
1. Forward a batch of training samples on GPU
2. get the output blobs and then calculate my own loss value, and gradient of the loss on CPU
( I have my own way of loss, and gradient calculation )
3. back propagate the gradient given by 2 to the rest of the network on GPU
4. Update all layer parameters according to gradient in 3.
5. Once a while save the learned network parameters.
Can I do this on python? I read this
https://github.com/BVLC/caffe/issues/1855 but not yet see how my wish can be implemented
many thanx