diyiiyiii / StyTR-2

StyTr2 : Image Style Transfer with Transformers
365 stars 66 forks source link

Error in running "train.py" #20

Open amirhoceiin1996 opened 1 year ago

amirhoceiin1996 commented 1 year ago

Hello. I have a problem when I'm trying to run train.py in google colab.

`/content/drive/MyDrive/dataset/metal
/content/drive/MyDrive/dataset/cardboard
/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py:566: UserWarning: This DataLoader will create 16 worker processes in total. Our suggested max number of worker in current system is 2, which is smaller than what this DataLoader is going to create. Please be aware that excessive worker creation might get DataLoader running slow or even freeze, lower the worker number to avoid potential slowness/freeze if necessary.
  cpuset_checked))
Traceback (most recent call last):
  File "/content/drive/MyDrive/StyTr/train.py", line 138, in <module>
    {'params': network.module.transformer.parameters()},
  File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1208, in __getattr__
    type(self).__name__, name))
AttributeError: 'StyTrans' object has no attribute 'module'`

How can I fix it?