-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with ResNet18 #87
Comments
While we are on this subject, would you consider giving it a model name that is better than "main" (which is the current name)? This could be very helpful. |
@tjingrant If you see the python notebook used to generate the above resnet18 model, /~https://github.com/onnx/models/blob/master/models/image_classification/resnet/train_resnet.ipynb @ankkhedia You can regenerate the model to change the model name from "main" to "mxnet_converted_model"(/~https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/contrib/onnx/mx2onnx/export_onnx.py#L339) |
This issue is about nonconformity. The model in question is incompatible with the ONNX spec and the relevant spec was cited in my original issue content. Note that I'm not claiming the model is semantically incorrect. |
This should be fixed with PR apache/mxnet#13356. |
@vandanavk seems like the model in the model zoo is not yet updated. |
Hi @tjingrant I have updated the model in the model zoo.Could you please verify it? Please feel free to re-open in case issue persists |
Hello, resnet18 referenced in this link: https://s3.amazonaws.com/onnx-model-zoo/resnet/resnet18v1/resnet18v1.onnx has problems between global average pool op and gemm op. Specifically, according to ONNX spec, the output of global avg pool retains the trailing trivial dimensions.
Thus, the output of this operation in the context of resnet18 will be (N, C, 1, 1), whereas gemm expects 2-dimensional input as implied by the ONNX spec:
Clearly putting gemm right after global average pool does not conform to the spec. Either model or the spec should be changed.
The text was updated successfully, but these errors were encountered: