oa::FlowTransformer

Reusable bidirectional Transformer backbone for flow/diffusion denoisers. input is conditioned token state [B,S,D] or flattened [B*S,D]; output keeps the same shape. This is a sibling model family that composes generic Transformer blocks; it is not part of the generic Transformer itself.

Inheritance

public Module

Public Methods

const oa::TransformerBlock & oa::FlowTransformer::block(oa::I32 inIndex)
oa::TransformerBlock & oa::FlowTransformer::block(oa::I32 inIndex)
const FlowTransformerConfig & oa::FlowTransformer::config()
oa::Matrix oa::FlowTransformer::forward(const oa::Matrix & inTokens)
oa::Matrix oa::FlowTransformer::forwardConditioned(const oa::Matrix & inTokens, const oa::Matrix & inCondition, const oa::Matrix & inTokenMask = = {})
oa::Matrix oa::FlowTransformer::forwardMasked(const oa::Matrix & inTokens, const oa::Matrix & inTokenMask)
bool oa::FlowTransformer::isMoe()
oa::I32 oa::FlowTransformer::numLayers()
void oa::FlowTransformer::setSequenceLength(oa::I32 inSequenceLength)

Constructor & Destructor Documentation

oa::FlowTransformer::FlowTransformer( const FlowTransformerConfig & inConfig )
No public source comment is attached to this declaration.

Parameters

inConfig
const FlowTransformerConfig &

Public Method Documentation

const oa::TransformerBlock & oa::FlowTransformer::block( oa::I32 inIndex )
No public source comment is attached to this declaration.

Parameters

inIndex
oa::I32

Returns

const oa::TransformerBlock &

The declared return value.

oa::TransformerBlock & oa::FlowTransformer::block( oa::I32 inIndex )
No public source comment is attached to this declaration.

Parameters

inIndex
oa::I32

Returns

oa::TransformerBlock &

The declared return value.

const FlowTransformerConfig & oa::FlowTransformer::config()
No public source comment is attached to this declaration.

Returns

const FlowTransformerConfig &

The declared return value.

oa::Matrix oa::FlowTransformer::forward( const oa::Matrix & inTokens )
No public source comment is attached to this declaration.

Parameters

inTokens
const oa::Matrix &

Returns

oa::Matrix

The declared return value.

oa::Matrix oa::FlowTransformer::forwardConditioned( const oa::Matrix & inTokens, const oa::Matrix & inCondition, const oa::Matrix & inTokenMask = = {} )
No public source comment is attached to this declaration.

Parameters

inTokens
const oa::Matrix &

inCondition
const oa::Matrix &

inTokenMask
const oa::Matrix &

Default: = {}

Returns

oa::Matrix

The declared return value.

oa::Matrix oa::FlowTransformer::forwardMasked( const oa::Matrix & inTokens, const oa::Matrix & inTokenMask )
No public source comment is attached to this declaration.

Parameters

inTokens
const oa::Matrix &

inTokenMask
const oa::Matrix &

Returns

oa::Matrix

The declared return value.

bool oa::FlowTransformer::isMoe()
No public source comment is attached to this declaration.

Returns

bool

The declared return value.

oa::I32 oa::FlowTransformer::numLayers()
No public source comment is attached to this declaration.

Returns

oa::I32

The declared return value.

void oa::FlowTransformer::setSequenceLength( oa::I32 inSequenceLength )
No public source comment is attached to this declaration.

Parameters

inSequenceLength
oa::I32

Returns

void

The declared return value.