I’m trying to implmement Normalized Advantage Function. In this case, you need to compute x^T P x in batch mode.
There’s already an implementation available here 128, but it requires creating a mask and multiplying the resulting matrix by that. It works for now, but I was hoping to play around with variations of NAF, and these methods would help me.