MCPcopy Create free account
hub / github.com/lukemelas/EfficientNet-PyTorch / set_swish

Method set_swish

efficientnet_pytorch/model.py:164–168  ·  view source on GitHub ↗

Sets swish function as memory efficient (for training) or standard (for export)

(self, memory_efficient=True)

Source from the content-addressed store, hash-verified

162 self._swish = MemoryEfficientSwish()
163
164 def set_swish(self, memory_efficient=True):
165 """Sets swish function as memory efficient (for training) or standard (for export)"""
166 self._swish = MemoryEfficientSwish() if memory_efficient else Swish()
167 for block in self._blocks:
168 block.set_swish(memory_efficient)
169
170
171 def extract_features(self, inputs):

Callers

nothing calls this directly

Calls 3

SwishClass · 0.85
set_swishMethod · 0.45

Tested by

no test coverage detected