PatchEmbed class
Splits the input image into non-overlapping patches and projects them to an embedding space using a convolution.
Input: (batch, 3, height, width) → Output: (batch, numPatches, embedDim)
Constructors
Properties
- embedDim → int
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- inChannels → int
-
final
- norm ↔ LayerNorm
-
getter/setter pair
- numPatches → int
-
Number of patches.
no setter
- numPatchesH ↔ int
-
getter/setter pair
- numPatchesW ↔ int
-
getter/setter pair
- patchSize → int
-
final
- proj ↔ Conv2d
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
forward(
Tensor x) → Tensor - Forward pass.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited