DSS-pytorch icon indicating copy to clipboard operation
DSS-pytorch copied to clipboard

module ‘torchvision.transforms’ has no attribute ‘zenCompose’

Open Kyle0936 opened this issue 7 years ago • 2 comments

Hi, I am trying to train a module using my own datasets. I follow all those instructions including installing pytorch (pip3 install --no-cache-dir torchvision). However, when I try to start training I get this error:

Traceback (most recent call last): File “main.py”, line 86, in main(config) File “main.py”, line 10, in main num_thread=config.num_thread) File “/Users/kyle/Documents/MATLAB/DSS-py/dataset.py”, line 34, in get_loader transform = transforms.zenCompose([ AttributeError: module ‘torchvision.transforms’ has no attribute ‘zenCompose’

I’ve googled it and it is said to be caused by collision between versions. However, the error still exists after I uninstall torch & pytorch for several times. I have no idea what to do now and I am completely new to pytorch. Anyone know what could be the solution?

Kyle0936 avatar Jul 24 '18 05:07 Kyle0936

It's my fault, please change line34 in dataset.py(zenCompose to Compose)

AceCoooool avatar Jul 24 '18 05:07 AceCoooool

Thanks so much!

Kyle0936 avatar Jul 24 '18 14:07 Kyle0936