update onnx model links (#2908)

updated in https://github.com/onnx/models/pull/644
This commit is contained in:
chenyu
2023-12-22 00:19:41 -05:00
committed by GitHub
parent 1bbeb3fe2f
commit 50cfb1fb3a
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -12,10 +12,10 @@ from tinygrad.tensor import Tensor
from tinygrad import Device
MODELS = {
"resnet50": "https://github.com/onnx/models/raw/main/archive/vision/classification/resnet/model/resnet50-caffe2-v1-9.onnx",
"resnet50": "https://github.com/onnx/models/raw/main/validated/vision/classification/resnet/model/resnet50-caffe2-v1-9.onnx",
"openpilot": "https://github.com/commaai/openpilot/raw/v0.9.4/selfdrive/modeld/models/supercombo.onnx",
"efficientnet": "https://github.com/onnx/models/raw/main/archive/vision/classification/efficientnet-lite4/model/efficientnet-lite4-11.onnx",
"shufflenet": "https://github.com/onnx/models/raw/main/archive/vision/classification/shufflenet/model/shufflenet-9.onnx",
"efficientnet": "https://github.com/onnx/models/raw/main/validated/vision/classification/efficientnet-lite4/model/efficientnet-lite4-11.onnx",
"shufflenet": "https://github.com/onnx/models/raw/main/validated/vision/classification/shufflenet/model/shufflenet-9.onnx",
"commavq": "https://huggingface.co/commaai/commavq-gpt2m/resolve/main/gpt2m.onnx",
# broken in torch MPS
+3 -3
View File
@@ -99,17 +99,17 @@ class TestOnnxModel(unittest.TestCase):
@unittest.skip("slow")
def test_efficientnet(self):
input_name, input_new = "images:0", True
self._test_model(fetch("https://github.com/onnx/models/raw/main/archive/vision/classification/efficientnet-lite4/model/efficientnet-lite4-11.onnx"), input_name, input_new) # noqa: E501
self._test_model(fetch("https://github.com/onnx/models/raw/main/validated/vision/classification/efficientnet-lite4/model/efficientnet-lite4-11.onnx"), input_name, input_new) # noqa: E501
def test_shufflenet(self):
input_name, input_new = "gpu_0/data_0", False
self._test_model(fetch("https://github.com/onnx/models/raw/main/archive/vision/classification/shufflenet/model/shufflenet-9.onnx"), input_name, input_new) # noqa: E501
self._test_model(fetch("https://github.com/onnx/models/raw/main/validated/vision/classification/shufflenet/model/shufflenet-9.onnx"), input_name, input_new) # noqa: E501
@unittest.skip("test is very slow")
def test_resnet(self):
# NOTE: many onnx models can't be run right now due to max pool with strides != kernel_size
input_name, input_new = "data", False
self._test_model(fetch("https://github.com/onnx/models/raw/main/archive/vision/classification/resnet/model/resnet18-v2-7.onnx"), input_name, input_new) # noqa: E501
self._test_model(fetch("https://github.com/onnx/models/raw/main/validated/vision/classification/resnet/model/resnet18-v2-7.onnx"), input_name, input_new) # noqa: E501
def _test_model(self, fn, input_name, input_new, debug=False):
onnx_model = onnx.load(fn)