class

GS::MASt3R::MASt3RDecoderBlock

Inherits Reference < Object

MASt3R Decoder Block with self-attention, cross-attention, and MLP Matches MASt3R checkpoint structure

Constructors

new(embed_dim : Int32, num_heads : Int32, mlp_ratio : Float32 = 4.0_f32, dropout : Float32 = 0.0_f32, device : Tensor::Device = Tensor::Device::GPU)
Source

Instance methods

cross_attn
Source
forward(x : Autograd::Variable, encoder_out : Autograd::Variable) : Autograd::Variable

Forward pass x: decoder features [batch, seq, embed_dim] encoder_out: encoder features for cross-attention [batch, seq, encoder_dim]

Source
norm1
Source
norm2
Source
norm3
Source
norm_y
Source
parameters
Source
self_attn
Source