Xilinx / Vitis-AI-Tutorials

MIT License
398 stars 146 forks source link

Question regarding output vectors from 02-MNIST_classification_tf tutorial #104

Open mohitajais opened 1 year ago

mohitajais commented 1 year ago

Hello, everyone!

I have followed the MNIST classification tutorial and was able to train, quantize and compile the model for the MNIST classification. I run app_mt.py on Kria KV260 with the compiled model to test 10010 images.

I get the following output

xilinx-k26-starterkit-2020_2:~$ python3 app_mt.py Command line options: --image_dir : img_dir --threads : 1 --model : images_in.xmodel Pre-processing 10010 images... Starting 1 threads... Throughput=5132.91 fps, total frames = 10010, time=1.9502 seconds Correct:983, Wrong:9027, Accuracy:0.0982 I have compiled the model with B3136 architecture. The model is giving low accuracy on Kria FPGA. Also, When I am printing output vectors then, it is showing Output Vector 0: [array([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], dtype=int8)].

Why it is showing 0 instead of showing any prediction value.? How to print output vectors or predictions after this line job_id = dpu.execute_async(inputData,outputData[len(ids)])

Is there any problem with generated compiled model for such a low accuracy?