Skip to content

Commit 193de67

Browse files
authored
Load model of current torchvision (triton-inference-server#298)
1 parent f4e24d7 commit 193de67

File tree

1 file changed

+2
-1
lines changed
  • examples/pytorch_platform_handler

1 file changed

+2
-1
lines changed

examples/pytorch_platform_handler/model.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828

2929
import torch
30+
import torchvision
3031

3132

3233
class ResNet50(torch.nn.Module):
@@ -35,7 +36,7 @@ class ResNet50(torch.nn.Module):
3536
def __init__(self):
3637
super().__init__()
3738
self._model = torch.hub.load(
38-
"pytorch/vision",
39+
"pytorch/vision:v" + torchvision.__version__.split("+")[0],
3940
"resnet50",
4041
weights="ResNet50_Weights.IMAGENET1K_V2",
4142
skip_validation=True,

0 commit comments

Comments
 (0)