Open jwpwhite opened 5 years ago
@jwpwhite In https://github.com/jwpwhite/birdpi-rp-dlr/blob/master/neotest.py#L8, you should set the number of the output classes to 8, to be consistent with the synset. Also, try running your model with MXNet (before uploading the model to Neo) and see if you get non-zero outputs.
System Information
Describe the problem
Trained custom bird classification model using this notbook: https://github.com/gabehollombe-aws/jupyter-notebooks
Following the steps in https://aws.amazon.com/blogs/aws/amazon-sagemaker-neo-train-your-machine-learning-models-once-run-them-anywhere/ to convert a MXNET resnet50 model to one for Raspberry pi 3B.
Testing image: /dlr-1.0-py2-armv7l/tests/dog.npy Runs without an issue if I use resnet50 model under /dlr-1.0-py2-armv7l/models
If I use my own custom trained model, probabilities or zero are returned for bird images or for the dog.npy. Seem the code I used below.
As you can see in https://github.com/jwpwhite/birdpi-rp-dlr/blob/master/neotest.py#L40 this is how I'm trying to run the inference, but as I mentioned it is giving me probabilities of zero when using my own custom trained model linked to below.
Code: https://github.com/jwpwhite/birdpi-rp-dlr Default model: resnet50 model included in /home/pi/dlr-1.0-py2-armv7l/models/resnet50 Custom model: https://www.dropbox.com/s/nc35wwuhemcrfjp/model-rasp3b.tar.gz?dl=0