Compose Custom Loss with Softmax #2677
I'm trying to create a custom loss function using symbolic variables. The loss function is the sum of the softmax error and other values computed from internal layers. I know I cannot achieve this with
I know there is a shape mismatch but I'm not sure what the issue is
Here is some sample code showing the basic structure I want to achieve with the network:
Does this make sense? I'm pretty sure this is possible, but I'm not sure where I went wrong.
On its own, the following does not compile:
while this does:
Thank you for the response! However, I am still a bit confused.
My aimed objective function is : softmax loss + custom value computed on internal fc layer
SoftmaxOutput does not output the raw loss value, so I cannot add this to another custom value and run MakeLoss on that? Or are you saying I don't need to explicitly add these symbols together