class

GS::MASt3R::MASt3REncoderBlockV2

Inherits Reference < Object

Standard ViT encoder block (no cross-attention)

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

forward(x : Autograd::Variable) : Autograd::Variable

Forward with pre-norm (like original MASt3R)

Source
norm1
Source
norm2
Source
parameters
Source
self_attn
Source