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)
SourceInstance methods
forward(x : Autograd::Variable) : Autograd::Variable
Forward with pre-norm (like original MASt3R)
Source