PatchEmbed constructor
PatchEmbed({})
Implementation
PatchEmbed({
required List<int> imgSize,
this.patchSize = 4,
this.inChannels = 3,
this.embedDim = 128,
}) {
proj = Conv2d(inChannels, embedDim, patchSize, stride: patchSize);
norm = LayerNorm(embedDim);
numPatchesH = imgSize[0] ~/ patchSize;
numPatchesW = imgSize[1] ~/ patchSize;
}