Need help authoring Model configuration for Pytorch MNIST
See original GitHub issueHi I am trying to host my first model in triton.
- Ran the MNIST model from examples/main.py at https://github.com/pytorch/examples/tree/master/mnist
- Saved model to “mnist_cnn.pt”
- Converted saved model to torchscript format.
- Created the following config and followed the steps at https://github.com/triton-inference-server/server/blob/main/docs/model_configuration.md to create a model repository
When I to run inference I get error saying mnist model failed, bad request.
platform: "pytorch_libtorch"
max_batch_size: 0
input [
{
name: "INPUT__0"
data_type: TYPE_FP32
dims: [ 28,28 ]
}
]
output [
{
name: "output__0"
data_type: TYPE_FP32
dims: [ 10 ]
}
]
What am I missing?
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Need help authoring Model configuration for Pytorch MNIST
Hi I am trying to host my first model in triton. I ran the MNIST model from examples/main.py at master · pytorch/examples (github.com)...
Read more >PyTorch MNIST Tutorial - Determined AI Documentation
This tutorial describes how to port an existing PyTorch model to Determined. We will port a simple image classification model for the MNIST...
Read more >What is torch.nn really? - PyTorch
PyTorch provides the elegantly designed modules and classes torch.nn , torch.optim , Dataset , and DataLoader to help you create and train neural...
Read more >Introduction to Pytorch Lightning - Read the Docs
This notebook requires some packages besides pytorch-lightning. ... Init our model mnist_model = MNISTModel() # Init DataLoader from MNIST ...
Read more >Introduction to PyTorch: Build a Neural Network to Recognize ...
Given an image of a handwritten digit, your model w… ... Up a Local Programming Environment for Python 3 to configure everything you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@rduser for the image client case it appears the model does not have the inputs format specified in the model config.
This needs to be specified to use the image client as is.
For the second error the number of elements is 783 but it should be 28281 = 784. This is why the HTTP server responds with the shape error.
Please make the necessary fix and try again.
Can you share the exact error you are seeing?