PatchMerging class

Downsamples the spatial resolution by 2x and doubles the channel dimension.

Takes patches in 2x2 regions, concatenates them, then projects to 2*dim.

Constructors

PatchMerging(int dim)

Properties

dim → int
final
hashCode → int
The hash code for this object.
no setterinherited
norm ↔ LayerNorm
getter/setter pair
reduction ↔ Linear
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

forward(Tensor x, int h, int w) → 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