AttributeError: in Colab #359

Open
opened 2022-12-11 14:00:51 +01:00 by subham0001 · 6 comments
subham0001 commented 2022-12-11 14:00:51 +01:00 (Migrated from github.com)

Hello,
when I try to run Simswap in Colab, I keep getting this error. Could some one kindly guide me on how to correct the error?
Error --------->>>>>>>>>

AttributeError Traceback (most recent call last)
in
14
15 torch.nn.Module.dump_patches = True
---> 16 model = create_model(opt)
17 model.eval()
18

5 frames
/usr/local/lib/python3.8/dist-packages/torch/optim/optimizer.py in setstate(self, state)
82 self.dict.update(state)
83 self._hook_for_profile() # To support multiprocessing pickle/unpickle.
---> 84 self.defaults.setdefault('differentiable', False)
85
86 def repr(self):

AttributeError: 'SGD' object has no attribute 'defaults'

Hello, when I try to run Simswap in Colab, I keep getting this error. Could some one kindly guide me on how to correct the error? **Error --------->>>>>>>>>** AttributeError Traceback (most recent call last) <ipython-input-9-46a887c84c9b> in <module> 14 15 torch.nn.Module.dump_patches = True ---> 16 model = create_model(opt) 17 model.eval() 18 5 frames /usr/local/lib/python3.8/dist-packages/torch/optim/optimizer.py in __setstate__(self, state) 82 self.__dict__.update(state) 83 self._hook_for_profile() # To support multiprocessing pickle/unpickle. ---> 84 self.defaults.setdefault('differentiable', False) 85 86 def __repr__(self): AttributeError: 'SGD' object has no attribute 'defaults'
chenchong23 commented 2022-12-11 17:57:20 +01:00 (Migrated from github.com)

I also met the same problem, did you solve it?

I also met the same problem, did you solve it?
subham0001 commented 2022-12-11 19:39:55 +01:00 (Migrated from github.com)

I also met the same problem, did you solve it?

No I didn't
if you'll get the solution please tell me my friend

> I also met the same problem, did you solve it? No I didn't if you'll get the solution please tell me my friend
amfapic commented 2022-12-12 13:26:53 +01:00 (Migrated from github.com)

I also met the same problem, did you solve it?

You should try previous pytorch versions (< 1.13):
pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html

> I also met the same problem, did you solve it? You should try previous pytorch versions (< 1.13): pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
subham0001 commented 2022-12-12 13:54:51 +01:00 (Migrated from github.com)

I also met the same problem, did you solve it?

You should try previous pytorch versions (< 1.13): pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html

where should I paste this code my friend.

> > I also met the same problem, did you solve it? > > You should try previous pytorch versions (< 1.13): pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html where should I paste this code my friend.
subham0001 commented 2022-12-12 14:44:25 +01:00 (Migrated from github.com)

I also met the same problem, did you solve it?

You should try previous pytorch versions (< 1.13): pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html

thanks bro from my heart
thank you. : )

> > I also met the same problem, did you solve it? > > You should try previous pytorch versions (< 1.13): pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html thanks bro from my heart thank you. : )
hemsflame commented 2022-12-18 14:46:24 +01:00 (Migrated from github.com)

I also met the same problem, did you solve it?

You should try previous pytorch versions (< 1.13): pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html

where should I paste this code my friend.

How to fix it in google colab bro ?

> > > I also met the same problem, did you solve it? > > > > > > You should try previous pytorch versions (< 1.13): pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html > > where should I paste this code my friend. How to fix it in google colab bro ?
Sign in to join this conversation.