Skip to content

Commit

Permalink
Let PyTorchModel define train/eval mode of LUMEModule during instanti…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
t-bz committed Jun 21, 2023
1 parent 861ff30 commit dd20dc5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lume_model/torch/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ def __init__(
self._feature_order = feature_order
self._output_order = output_order
self.register_module("base_model", self._model.model)
if not model.model.training: # PyTorchModel defines train/eval mode
self.eval()

@property
def feature_order(self):
Expand Down

0 comments on commit dd20dc5

Please sign in to comment.