Skip to content

Commit

Permalink
Torch: print model at log verbosity 3
Browse files Browse the repository at this point in the history
Closes #1575
  • Loading branch information
NeoLegends authored Jul 5, 2024
1 parent 2c0b75c commit b2553c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion returnn/torch/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ def _create_model(self, *, epoch: int, step: int):
else:
raise TypeError(f"get_model returned {model} of type {type(model)}, expected rf.Module or torch.nn.Module")
assert isinstance(self._pt_model, torch.nn.Module)
print("Model:", self._pt_model, file=log.v4)
print("Model:", self._pt_model, file=log.v3)
num_params = sum([parameter.numel() for parameter in self._pt_model.parameters()])
print(f"net params #: {num_params}", file=log.v2)

Expand Down

0 comments on commit b2553c0

Please sign in to comment.