Skip to content

Commit

Permalink
修复Tester初始化bug (#401)
Browse files Browse the repository at this point in the history
Co-authored-by: ouyhlan <[email protected]>
  • Loading branch information
ouyhlan and ouyhlan authored Dec 2, 2021
1 parent 9ac7d09 commit a4f792d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fastNLP/core/tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def __init__(self, data, model, metrics, batch_size=16, num_workers=0, device=No
self._predict_func = self._model.predict
self._predict_func_wrapper = self._model.predict
else:
if _model_contains_inner_module(model):
if _model_contains_inner_module(self._model):
self._predict_func_wrapper = self._model.forward
self._predict_func = self._model.module.forward
else:
Expand Down

0 comments on commit a4f792d

Please sign in to comment.