MCPcopy Create free account
hub / github.com/ActiveVisionLab/DFNet / __init__

Method __init__

script/feature/efficientnet.py:193–209  ·  view source on GitHub ↗
(self, feat_dim=12, places365_model_path='')

Source from the content-addressed store, hash-verified

191 std = [0.229, 0.224, 0.225]
192
193 def __init__(self, feat_dim=12, places365_model_path=''):
194 super(EfficientNetB0, self).__init__()
195 # Initialize architecture
196 self.backbone_net = EfficientNet.from_pretrained('efficientnet-b0')
197 self.feature_extractor = self.backbone_net.extract_endpoints
198
199 # self.feature_block_index = [1, 3, 6] # same as the 'hypercolumn_layers'
200 self.feature_block_index = [1, 3, 5] # same as the 'hypercolumn_layers'
201 # self.feature_block_index = [2, 4, 6] # same as the 'hypercolumn_layers'
202 # self.feature_block_index = [1]
203
204 ## adaptation layers, see off branches from fig.3 in S2DNet paper
205 self.adaptation_layers = AdaptLayers2(self.default_conf['hypercolumn_layers'], self.default_conf['output_dim'])
206
207 # pose regression layers
208 self.avgpool = nn.AdaptiveAvgPool2d(1)
209 self.fc_pose = nn.Linear(1280, feat_dim)
210
211 def forward(self, x, return_feature=False, isSingleStream=False, return_pose=False, upsampleH=120, upsampleW=213):
212 '''

Callers

nothing calls this directly

Calls 2

AdaptLayers2Class · 0.85
__init__Method · 0.45

Tested by

no test coverage detected