Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben-Louis committed Dec 13, 2023
1 parent 2207861 commit 97231f8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mmdeploy/codebase/base/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,10 @@ def build_pytorch_model(self,
'switch_to_deploy'):
model.backbone.switch_to_deploy()

if hasattr(model, 'switch_to_deploy') and callable(model.switch_to_deploy):
model.switch_to_deploy()

if hasattr(model, 'switch_to_deploy') and callable(
model.switch_to_deploy):
model.switch_to_deploy()

model = model.to(self.device)
model.eval()
return model
Expand Down

0 comments on commit 97231f8

Please sign in to comment.