Skip to content

Commit cb27f9a

Browse files
authored
Merge pull request leoxiaobin#39 from sunke123/master
fix the bug of get_model_summary
2 parents d194836 + 2637e24 commit cb27f9a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/utils/utils.py

+1
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ def hook(module, input, output):
150150
and module != model:
151151
hooks.append(module.register_forward_hook(hook))
152152

153+
model.eval()
153154
model.apply(add_hooks)
154155

155156
space_len = item_length

0 commit comments

Comments
 (0)