MCPcopy Create free account
hub / github.com/OpenGVLab/UniFormerV2 / forward

Method forward

extract_clip/model.py:138–154  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

136 return nn.Sequential(*layers)
137
138 def forward(self, x):
139 def stem(x):
140 x = self.relu1(self.bn1(self.conv1(x)))
141 x = self.relu2(self.bn2(self.conv2(x)))
142 x = self.relu3(self.bn3(self.conv3(x)))
143 x = self.avgpool(x)
144 return x
145
146 x = x.type(self.conv1.weight.dtype)
147 x = stem(x)
148 x = self.layer1(x)
149 x = self.layer2(x)
150 x = self.layer3(x)
151 x = self.layer4(x)
152 x = self.attnpool(x)
153
154 return x
155
156
157class LayerNorm(nn.LayerNorm):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected