Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
y199387 committed Jul 19, 2022
1 parent 4f59052 commit edcb900
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/nano/src/bigdl/nano/pytorch/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class ChannelsLastCallback(pl.Callback):

def setup(self, trainer, pl_module, stage: Optional[str] = None) -> None:
"""Override hook setup to convert model to channels_last and wrap DataHook."""
# TODO: add check for module_states
fn_old = getattr(pl_module, "on_before_batch_transfer")
fn = batch_call(fn_old)
setattr(pl_module, "on_before_batch_transfer_origin", fn_old)
Expand Down

0 comments on commit edcb900

Please sign in to comment.