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

Method reset_classifier

slowfast/models/uniformer.py:381–383  ·  view source on GitHub ↗
(self, num_classes, global_pool='')

Source from the content-addressed store, hash-verified

379 return self.head
380
381 def reset_classifier(self, num_classes, global_pool=''):
382 self.num_classes = num_classes
383 self.head = nn.Linear(self.embed_dim, num_classes) if num_classes > 0 else nn.Identity()
384
385 def inflate_weight(self, weight_2d, time_dim, center=False):
386 if center:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected