I would like to implement exactly same function as you, Cross Entropy which takes soft target one-hot-like vector as an input.
I tried to train CNN with your cross_entropy function, but it seems that backward propagation of this function does not work properly.
Should I implement further this function for the backward propagation?
If yes, please provide me some guide.