AceCoooool / DSS-pytorch

:star: PyTorch implement of Deeply Supervised Salient Object Detection with Short Connection
MIT License
174 stars 53 forks source link

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

Open Kyle0936 opened 5 years ago

Kyle0936 commented 5 years ago

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?

AceCoooool commented 5 years ago

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

Kyle0936 commented 5 years ago

Thanks so much!