Skip to content

Commit

Permalink
address #33 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Nov 21, 2024
1 parent 7f6cd75 commit 26b6de3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ema_pytorch/ema_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def __init__(

# handle callable returning ema module

if callable(ema_model):
if not isinstance(ema_model, Module) and callable(ema_model):
ema_model = ema_model()

# ema model
Expand Down
2 changes: 1 addition & 1 deletion ema_pytorch/post_hoc_ema.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def __init__(

# handle callable returning ema module

if callable(ema_model):
if not isinstance(ema_model, Module) and callable(ema_model):
ema_model = ema_model()

# ema model
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name = 'ema-pytorch',
packages = find_packages(exclude=[]),
version = '0.7.4',
version = '0.7.5',
license='MIT',
description = 'Easy way to keep track of exponential moving average version of your pytorch module',
author = 'Phil Wang',
Expand Down

0 comments on commit 26b6de3

Please sign in to comment.