Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and awaelchli committed Jan 13, 2023
1 parent 723e3f9 commit e7618cd
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,11 @@ def __init__(self, model: "pl.LightningModule", max_depth: int = 1) -> None:
self._layer_summary = self.summarize()
# 1 byte -> 8 bits
# TODO: how do we compute precision_megabytes in case of mixed precision?
precision = self._model.trainer.precision if self._model._trainer is not None and isinstance(self._model.trainer.precision, int) else 32
precision = (
self._model.trainer.precision
if self._model._trainer is not None and isinstance(self._model.trainer.precision, int)
else 32
)
self._precision_megabytes = (precision / 8.0) * 1e-6

@property
Expand Down

0 comments on commit e7618cd

Please sign in to comment.