oa::FnFlow

FnFlow namespace in the OA Ml public surface.

NsC++ public headers

Public Functions

oa::Matrix oa::FnFlow::eulerStep(const oa::Matrix & inState, const oa::Matrix & inVelocity, oa::F32 inDeltaTime)
FlowMatchBatch oa::FnFlow::linearMatch(const oa::Matrix & inClean, const oa::Matrix & inNoise, const oa::Matrix & inTime)
oa::Matrix oa::FnFlow::maskedMse(const oa::Matrix & inPrediction, const oa::Matrix & inTarget, const oa::Matrix & inMask)

Function Documentation

oa::Matrix oa::FnFlow::eulerStep( const oa::Matrix & inState, const oa::Matrix & inVelocity, oa::F32 inDeltaTime )
One explicit Euler integration step: x(t + dt) = x(t) + dt * v(t). Sampling noise-to-data passes a negative inDeltaTime.

Parameters

inState
const oa::Matrix &

inVelocity
const oa::Matrix &

inDeltaTime
oa::F32

Returns

oa::Matrix

The declared return value.

FlowMatchBatch oa::FnFlow::linearMatch( const oa::Matrix & inClean, const oa::Matrix & inNoise, const oa::Matrix & inTime )
Construct x(t) = clean + t * (noise - clean) and the training target v(t) = noise - clean. inTime may be scalar, [B], or already broadcastable to inClean. A [B] vector is expanded across every non-batch dimension.

Parameters

inClean
const oa::Matrix &

inNoise
const oa::Matrix &

inTime
const oa::Matrix &

Returns

FlowMatchBatch

The declared return value.

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.