MCPcopy Create free account
hub / github.com/CHENGY12/PLOT / forward

Method forward

plot-pp/clip/model.py:138–153  ·  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 for conv, bn in [(self.conv1, self.bn1), (self.conv2, self.bn2), (self.conv3, self.bn3)]:
141 x = self.relu(bn(conv(x)))
142 x = self.avgpool(x)
143 return x
144
145 x = x.type(self.conv1.weight.dtype)
146 x = stem(x)
147 x = self.layer1(x)
148 x = self.layer2(x)
149 x = self.layer3(x)
150 x = self.layer4(x)
151 x = self.attnpool(x)
152
153 return x
154
155
156class LayerNorm(nn.LayerNorm):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected