MCPcopy Create free account
hub / github.com/QWTforGithub/T2LDM / forward

Method forward

timm/models/pit.py:233–242  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

231 return cls_tokens[:, 0]
232
233 def forward(self, x):
234 x = self.forward_features(x)
235 if self.head_dist is not None:
236 x, x_dist = self.head(x[0]), self.head_dist(x[1]) # x must be a tuple
237 if self.training and not torch.jit.is_scripting():
238 return x, x_dist
239 else:
240 return (x + x_dist) / 2
241 else:
242 return self.head(x)
243
244
245def checkpoint_filter_fn(state_dict, model):

Callers

nothing calls this directly

Calls 1

forward_featuresMethod · 0.95

Tested by

no test coverage detected