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

Method forward

script/feature/efficientnet.py:173–179  ·  view source on GitHub ↗

Apply adaptation layers. # here is list of three levels of features

(self, features: List[torch.tensor])

Source from the content-addressed store, hash-verified

171 self.add_module("adapt_layer_{}".format(i), layer) # ex: adapt_layer_0
172
173 def forward(self, features: List[torch.tensor]):
174 """Apply adaptation layers. # here is list of three levels of features
175 """
176
177 for i, _ in enumerate(features):
178 features[i] = getattr(self, "adapt_layer_{}".format(i))(features[i])
179 return features
180
181class EfficientNetB0(nn.Module):
182 ''' DFNet with EB0 backbone, feature levels can be customized '''

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected