GS::MASt3R::MASt3REncoderV2
MASt3R Encoder v2: standard ViT without cross-attention Uses RoPE for position embeddings (computed, not stored)
Constructors
new(config : MASt3REncoderConfigV2, device : Tensor::Device = Tensor::Device::GPU)
SourceInstance methods
blocks
Sourceconfig
Sourceforward(x : Autograd::Variable) : Autograd::Variable
Encode single image x: [batch, channels, height, width] Returns: [batch, num_patches, embed_dim]
forward_pair(x1 : Autograd::Variable, x2 : Autograd::Variable) : Tuple(Autograd::Variable, Autograd::Variable)
Encode image pair (for stereo) Simply encodes each image separately (cross-attention happens in decoder)
norm
Sourceparameters
Sourcepatch_embed
Source