Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoEncoder using the EfficientNet #257

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
fixed variable
xingyaoww committed Dec 20, 2020

Verified

This commit was signed with the committer’s verified signature.
fmichonneau François Michonneau
commit 52067bd550c12faec6b4049fa79cf52c4dd79334
4 changes: 3 additions & 1 deletion efficientnet_pytorch/model.py
Original file line number Diff line number Diff line change
@@ -218,6 +218,7 @@ def __init__(self, blocks_args=None, global_params=None):
self._swish = MemoryEfficientSwish()

self._image_size = image_size
self._last_block_args = block_args

def set_swish(self, memory_efficient=True):
"""Sets swish function as memory efficient (for training) or standard (for export).
@@ -443,9 +444,10 @@ class EfficientNetAutoEncoder(EfficientNet):

def __init__(self, blocks_args=None, global_params=None):
super().__init__(blocks_args=blocks_args, global_params=global_params)
bn_mom = self._bn_mon
bn_mom = self._bn_mom
bn_eps = self._bn_eps
image_size = self._image_size
block_args = self._last_block_args

# EfficientNet Decoder
# use dynamic image size for decoder