[SOLVED] How can I use my own dataset to run NN examples

Discussions about the AI-deck
Post Reply
aqqz
Beginner
Posts: 16
Joined: Wed Nov 18, 2020 1:40 am

[SOLVED] How can I use my own dataset to run NN examples

Post by aqqz »

I run the MNIST examples successfully on the AI-Deck, but how can I use my own datasets on it.
I modify the mnist.load_data() function in the train.py and the save_sample.py, I want to change the model`s input,but when I run on the AI-Deck or gvsoc,it stop at `start timer...`,my SDK version is 3.8.1.
Last edited by aqqz on Sun Dec 19, 2021 9:13 am, edited 1 time in total.
gemenerik
Beginner
Posts: 19
Joined: Wed Apr 07, 2021 11:11 am

Re: How can I use my own dataset to run NN examples

Post by gemenerik »

Hi aqqz!

The path from a dataset to execution of a neural network on the GAP8 is quite extensive.
Assuming you have only changed the dataset used, here are some pointers to help you get started on debugging this:

Perhaps your custom dataset is incompatible with the application code (code that runs on the GAP8 and calls the network). It appears that the MNIST example automatically extracts the image resolution from the loaded dataset. Perhaps your dataset's spatial resolution is different?
Are you running from the docker? A different TensorFlow version might convert the CNN to operators unsupported by GAP SDK.
The easiest starting point is to inspect the generated TensorFlow lite (.tflite) model in e.g. netron. What are the differences between yours and the one from the unchanged example?
aqqz
Beginner
Posts: 16
Joined: Wed Nov 18, 2020 1:40 am

Re: How can I use my own dataset to run NN examples

Post by aqqz »

Thanks for your advises, I use the higher version Tensorflow to train models, I will test it again and compare the difference between the tflite models !
Post Reply