Say i want to train a neural network with 10 classes as outputs and use
categorical_cross_entropy as a loss function in keras. This will try
to fit the training data as best as possible irregardless of the outcome (i.e. value). If I want to take value into account, I have to use something like a policy gradient RL algorithm. How do I formulate the loss of policy gradient algorithm in this case ?
The standard categorical cross entropy loss function is as follows where y_ = true value, and y = predicted value:
loss = -mean( y_ * log(y))
I am thinking to just multiply the true value by the reward and still use the
categorical cross entropy of keras i.e.
y_ = y_ * reward loss = -mean( y_* log(y) )
Is my interpretation correct ?