oa::FlowTimeEmbedding

GPU sinusoidal embedding for normalized continuous time. Only the small, deterministic frequency vector is uploaded at construction; every batch is embedded by OA matrix kernels without a tensor-sized CPU loop or readback.

Inheritance

public Module

Public Methods

oa::I32 oa::FlowTimeEmbedding::embeddingDim()
oa::Matrix oa::FlowTimeEmbedding::forward(const oa::Matrix & inTime)
oa::F32 oa::FlowTimeEmbedding::maxPeriod()
oa::F32 oa::FlowTimeEmbedding::timeScale()

Constructor & Destructor Documentation

oa::FlowTimeEmbedding::FlowTimeEmbedding( oa::I32 inEmbeddingDim, oa::F32 inMaxPeriod = 10000.0F, oa::F32 inTimeScale = 1000.0F )
No public source comment is attached to this declaration.

Parameters

inEmbeddingDim
oa::I32

inMaxPeriod
oa::F32

Default: 10000.0F

inTimeScale
oa::F32

Default: 1000.0F

Public Method Documentation

oa::I32 oa::FlowTimeEmbedding::embeddingDim()
No public source comment is attached to this declaration.

Returns

oa::I32

The declared return value.

oa::Matrix oa::FlowTimeEmbedding::forward( const oa::Matrix & inTime )
inTime is [B] or [B,1]; output is [B,EmbeddingDim].

Parameters

inTime
const oa::Matrix &

Returns

oa::Matrix

The declared return value.

oa::F32 oa::FlowTimeEmbedding::maxPeriod()
No public source comment is attached to this declaration.

Returns

oa::F32

The declared return value.

oa::F32 oa::FlowTimeEmbedding::timeScale()
No public source comment is attached to this declaration.

Returns

oa::F32

The declared return value.