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

Method __init__

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

Source from the content-addressed store, hash-verified

69 std = [0.229, 0.224, 0.225]
70
71 def __init__(self, feat_dim=12, places365_model_path=''):
72 super(EfficientNetB3, self).__init__()
73 # Initialize architecture
74 self.backbone_net = EfficientNet.from_pretrained('efficientnet-b3')
75 self.feature_extractor = self.backbone_net.extract_endpoints
76
77 # self.feature_block_index = [1, 3, 6] # same as the 'hypercolumn_layers'
78 self.feature_block_index = [1, 3, 5] # same as the 'hypercolumn_layers'
79 # self.feature_block_index = [2, 4, 6] # same as the 'hypercolumn_layers'
80
81 ## adaptation layers, see off branches from fig.3 in S2DNet paper
82 self.adaptation_layers = AdaptLayers(self.default_conf['hypercolumn_layers'], self.default_conf['output_dim'])
83
84 # pose regression layers
85 self.avgpool = nn.AdaptiveAvgPool2d(1)
86 self.fc_pose = nn.Linear(1536, feat_dim)
87
88 def forward(self, x, return_feature=False, isSingleStream=False, upsampleH=120, upsampleW=213):
89 '''

Callers

nothing calls this directly

Calls 2

AdaptLayersClass · 0.70
__init__Method · 0.45

Tested by

no test coverage detected