Closed jessicaloohw closed 7 years ago
The loss is simple cross entropy: https://github.com/haeusser/learning_by_association/blob/master/semisup/backend.py#L179
I personally would suggest to use a scalable framework with auto-differentiation such as PyTorch, Caffe2, Torch, Theano, younameit.
How would I calculate the backpropagation through the loss layer i.e. the derivative of the loss w.r.t. the embeddings, A and B? I am trying to implement this in MatConvNet, which requires me to code the backward pass.