oa::FnFlow::maskedMse

Mean squared error over only valid elements. inMask is a binary 0/1 mask and may be scalar or broadcastable to inPrediction (for example [B,S,1] for padded motion tokens). Padding therefore never changes the loss scale.

Function Documentation

oa::Matrix oa::FnFlow::maskedMse( const oa::Matrix & inPrediction, const oa::Matrix & inTarget, const oa::Matrix & inMask )
Mean squared error over only valid elements. inMask is a binary 0/1 mask and may be scalar or broadcastable to inPrediction (for example [B,S,1] for padded motion tokens). Padding therefore never changes the loss scale.

Parameters

inPrediction
const oa::Matrix &

inTarget
const oa::Matrix &

inMask
const oa::Matrix &

Returns

oa::Matrix

The declared return value.