MCPcopy Create free account
hub / github.com/alinlab/SelfPatch / __init__

Method __init__

main_selfpatch.py:137–144  ·  view source on GitHub ↗
(self, backbone, ca_head, c_head, p_head)

Source from the content-addressed store, hash-verified

135
136class MultiCropWrapper(nn.Module):
137 def __init__(self, backbone, ca_head, c_head, p_head):
138 super(MultiCropWrapper, self).__init__()
139 # disable layers dedicated to ImageNet labels classification
140 backbone.fc, backbone.head = nn.Identity(), nn.Identity()
141 self.backbone = backbone
142 self.ca_head = ca_head
143 self.c_head = c_head
144 self.p_head = p_head
145
146 def forward(self, x, head_only=False, loc=True):
147 output = self.backbone(x)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected