Skip to content

Commit 9cb7dd0

Browse files
committed
[GPUNet/TorchHub] Updated precision handling
1 parent 41ca582 commit 9cb7dd0

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

PyTorch/Classification/GPUNet/configs/gpunet_torchhub.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ def nvidia_gpunet(pretrained=True, **kwargs):
5959

6060
modelMath = kwargs.get('model_math', 'fp32')
6161
if modelMath == "fp16":
62-
modelMath = torch.float16
63-
else:
64-
modelMath = torch.float32
65-
66-
model = model.to("cuda", modelMath)
62+
model.half()
6763

6864
return model

0 commit comments

Comments
 (0)