Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RuntimeError: Could not open file caffenet/deploy.prototxt

I am getting this error in google colab

RuntimeError: Could not open file caffenet/deploy.prototxt

this is the code cell it is running on

net = caffe.Net("caffenet/deploy.prototxt",
                 "caffenet/bvlc_reference_caffenet.caffemodel",
            caffe.TEST)

have already searched for a solution here

RuntimeError while opening deploy.prototxt

and here

RuntimeError while opening deploy.prototxt

but they do not solve the issue, might be related to google colab itself

like image 873
0101 Avatar asked May 19 '26 03:05

0101


2 Answers

I ran into the same problem. I figured out I was using the wrong caffemodel. I listed down all the files using !ls and it showed different caffemodels. I was earlier mentioning 735 but it had no such file. Except the ones with 270. Changes the name and it worked!

like image 165
Vani Gupta Avatar answered May 20 '26 17:05

Vani Gupta


change the name of your file to prototxt.txt and it should work

like image 32
Ravi Singh Avatar answered May 20 '26 16:05

Ravi Singh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!