OSError: Could not find the file for module nn

When i tried to run the cifar10 network program,it is showing the following error. How can i solve this.
OSError: Could not find the file.

You need to put the network on the OpenMV Cam’s disk. That said, the cifar10 net doesn’t run on the OpenMV Cam M7. You can run the cifar10 fast net on the OpenMV Cam.

If you want to do that, please add softmax=True to the nn.forward() call.


I am new to openmv. I am interested to test nn with openmv. The first thing I try to do is download the smile.network, but I can not copy this network into the disk. When I connect the openmv cam to the windows pc, it is showing “0 Byte free of 79.0K byte”.



Hi, use an SD card.

Hi, Thanks, I just put 8G SD card.

I can now downloaded cifar10.network/cifar10_fast.network and copy into the disk, and try the example code

net = nn.load(’/cifar10_fast.network’)
labels = [‘airplane’, ‘automobile’, ‘bird’, ‘cat’, ‘deer’, ‘dog’, ‘frog’, ‘horse’, ‘ship’, ‘truck’]

clock = time.clock()

img = sensor.snapshot()

for obj in net.search(img, threshold=0.6, min_scale=0.4, scale_mul=0.8,
x_overlap=0.5, y_overlap=0.5, contrast_threshold=0.5):
print(“Detected %s - Confidence %f%%” % (labels[obj.index()], obj.value()))
img.draw_rectangle(obj.rect(), color=(255, 0, 0))

But the results are always :
First layer is NULL!
First layer is NULL!
First layer is NULL!
First layer is NULL!

Where can be the problem, please? The network downloaded from the githup is not a already trained network?



Looks like the file may be corrupted or you didn’t download the file from github. You have to download the raw file:


Also make sure the file is written before resetting the camera (safely remove the disk if you have to).

Thanks iabdalkader, I copy the network you give into the disk and now it works.