Hacked loss layer to backprop only the nodes corresponding to actions.