-
Notifications
You must be signed in to change notification settings - Fork 861
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'SGD' object has no attribute 'defaults' #357
Comments
I also met the same problem, did you solve it? |
hi. yes. |
hi. yes
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
…On Sun, Dec 11, 2022 at 8:28 PM chenchong23 ***@***.***> wrote:
I also met the same problem, did you solve it?
—
Reply to this email directly, view it on GitHub
<#357 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4SORJCQHSIOXFID35YI7N3WMYB2NANCNFSM6AAAAAAS2F2VWI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Was also having this issue. This fix works. Thank you amfatic |
Hi, i did this but it doesnt seem to work anymore. Any other solution? Thanks in advanced! :) |
@tubi1 This works, pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 Try restarting your colab after installation |
Add the pip install and restart the runtime won't work. |
I found that using !pip install torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html works. The previous answers had install torch==1.8.1+cu111 but it was incompatible with torchtext 0.14.0 so I did not need to install,( so by using current torch==1.13.1 it worked fine.) |
Sorry, but it not working :( |
All these solutions won't work as of February , 2023. The below installations work -
Hope this helps ... Do not forget to restart your runtime after the installation .. |
We fixed the "AttributeError: 'SGD' object has no attribute 'defaults' now" bug. If you have already downloaded arcface_checkpoint.tar, please download it again. Also, you also need to update the scripts in |
Hi, when I try to run simswap in colab, I get this error. Can anybody please guide me on how to fix the 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'
The text was updated successfully, but these errors were encountered: