0
votes

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'

1
In which directory are you running your program? You might want to see this. - GoodDeeds
what version of caffe are you running? what branch? Transformer was introduced later than other caffe.io functions. - Shai
@Shai I am using the modified caffe required for deconvnet from github.com/HyeonwooNoh/caffe will i have to update my caffe.io file? - Virat aGarwal
@VirataGarwal you need to examine the io.py file if your branch. - Shai
@Shai can u suggest any changes needed to be made in the io.py file? - Virat aGarwal

1 Answers

1
votes

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.