ViTBackbone class

Inheritance

Constructors

ViTBackbone({required int imageSize, required int patchSize, int numChannels = 3, required int embedSize, int numLayers = 4, int numHeads = 4})

Properties

clsToken Tensor
getter/setter pair
embedSize int
final
hashCode int
The hash code for this object.
no setterinherited
imageSize int
final
numChannels int
final
patchProjection Layer
getter/setter pair
patchSize int
final
posEmbeddings Tensor
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
transformerEncoder TransformerEncoder
final

Methods

forward(Tensor patchifiedImage, List<Tensor> tracker) Tensor
Takes a Tensor of shape numPatches, patch_pixels For a 224x224 image with 16x16 patches, input is 196, 768
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parameters() List<Tensor>
override
step(double lr) → void
inherited
toString() String
A string representation of this object.
inherited
zeroGrad() → void
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited