We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d82960 commit b130081Copy full SHA for b130081
1 file changed
Quick_Deploy/PyTorch/export.py
@@ -1,4 +1,4 @@
1
-# Copyright 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+# Copyright 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
#
3
# Redistribution and use in source and binary forms, with or without
4
# modification, are permitted provided that the following conditions
@@ -25,11 +25,12 @@
25
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
27
import torch
28
-
29
-torch.hub._validate_not_a_forked_repo = lambda a, b, c: True
+from torchvision import models
30
31
model = (
32
- torch.hub.load("pytorch/vision:v0.10.0", "resnet50", pretrained=True)
+ models.resnet50(
+ weights=models.ResNet50_Weights.IMAGENET1K_V1
33
+ )
34
.eval()
35
.to("cuda")
36
)
0 commit comments