Virat aGarwal
Virat aGarwal

Reputation: 13

Cannot find Transformer function in module in caffe

Here is the error i get when i run the transformer function for preprocessing the image.

Traceback (most recent call last): File "tst.py", line 18, in

transformer = caffe.io.Transformer({'data': net.blobs['data'].data.shape}) AttributeError: 'module' object has no attribute 'Transformer'

Upvotes: 0

Views: 319

Answers (1)

Virat aGarwal
Virat aGarwal

Reputation: 13

I actually figured it out.

The io.py file did not contain the class Trasnformer. Maybe it was missing in the modified caffe. I took the class from the original BVLC caffe and pasted it in the io.py file. Link to io.py of BVLC caffe https://github.com/BVLC/caffe/blob/master/python/caffe/io.py

works for me.

Upvotes: 1

Related Questions