MCPcopy Create free account
hub / github.com/Monalissaa/DisenDiff / forward

Method forward

clip/model.py:135–150  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

133 return nn.Sequential(*layers)
134
135 def forward(self, x):
136 def stem(x):
137 for conv, bn in [(self.conv1, self.bn1), (self.conv2, self.bn2), (self.conv3, self.bn3)]:
138 x = self.relu(bn(conv(x)))
139 x = self.avgpool(x)
140 return x
141
142 x = x.type(self.conv1.weight.dtype)
143 x = stem(x)
144 x = self.layer1(x)
145 x = self.layer2(x)
146 x = self.layer3(x)
147 x = self.layer4(x)
148 x = self.attnpool(x)
149
150 return x
151
152
153class LayerNorm(nn.LayerNorm):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected