Closed nascacorp closed 1 year ago
Right.
Traceback (most recent call last):
File "test_wholeimage_swapsingle.py", line 51, in <module>
model = create_model(opt)
File "/content/SimSwap/models/models.py", line 18, in create_model
model.initialize(opt)
File "/content/SimSwap/models/fs_model.py", line 67, in initialize
netArc_checkpoint = torch.load(netArc_checkpoint)
File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 795, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 1012, in _legacy_load
result = unpickler.load()
File "/usr/local/lib/python3.8/dist-packages/torch/optim/sgd.py", line 112, in __setstate__
super().__setstate__(state)
File "/usr/local/lib/python3.8/dist-packages/torch/optim/optimizer.py", line 84, in __setstate__
self.defaults.setdefault('differentiable', False)
AttributeError: 'SGD' object has no attribute 'defaults'
Related:
hi pal, first of all thankyou for all your job, its awesome, last days ive getting this trouble:
/content/SimSwap /usr/local/lib/python3.8/dist-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.parallel.data_parallel.DataParallel' has changed. Saved a reverse patch to DataParallel.patch. Run
model = create_model(opt)
File "/content/SimSwap/models/models.py", line 18, in create_model
model.initialize(opt)
File "/content/SimSwap/models/fs_model.py", line 67, in initialize
netArc_checkpoint = torch.load(netArc_checkpoint)
File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 795, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 1012, in _legacy_load
result = unpickler.load()
File "/usr/local/lib/python3.8/dist-packages/torch/optim/sgd.py", line 112, in setstate
super().setstate(state)
File "/usr/local/lib/python3.8/dist-packages/torch/optim/optimizer.py", line 84, in setstate
self.defaults.setdefault('differentiable', False)
AttributeError: 'SGD' object has no attribute 'defaults'
patch -p0 < DataParallel.patch
to revert your changes. warnings.warn(msg, SourceChangeWarning) /usr/local/lib/python3.8/dist-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.conv.Conv2d' has changed. Tried to save a patch, but couldn't create a writable file Conv2d.patch. Make sure it doesn't exist and your working directory is writable. warnings.warn(msg, SourceChangeWarning) /usr/local/lib/python3.8/dist-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.batchnorm.BatchNorm2d' has changed. Saved a reverse patch to BatchNorm2d.patch. Runpatch -p0 < BatchNorm2d.patch
to revert your changes. warnings.warn(msg, SourceChangeWarning) /usr/local/lib/python3.8/dist-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.activation.PReLU' has changed. Saved a reverse patch to PReLU.patch. Runpatch -p0 < PReLU.patch
to revert your changes. warnings.warn(msg, SourceChangeWarning) /usr/local/lib/python3.8/dist-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.pooling.MaxPool2d' has changed. Saved a reverse patch to MaxPool2d.patch. Runpatch -p0 < MaxPool2d.patch
to revert your changes. warnings.warn(msg, SourceChangeWarning) /usr/local/lib/python3.8/dist-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.container.Sequential' has changed. Saved a reverse patch to Sequential.patch. Runpatch -p0 < Sequential.patch
to revert your changes. warnings.warn(msg, SourceChangeWarning) /usr/local/lib/python3.8/dist-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.pooling.AdaptiveAvgPool2d' has changed. Saved a reverse patch to AdaptiveAvgPool2d.patch. Runpatch -p0 < AdaptiveAvgPool2d.patch
to revert your changes. warnings.warn(msg, SourceChangeWarning) /usr/local/lib/python3.8/dist-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.linear.Linear' has changed. Saved a reverse patch to Linear.patch. Runpatch -p0 < Linear.patch
to revert your changes. warnings.warn(msg, SourceChangeWarning) /usr/local/lib/python3.8/dist-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.activation.Sigmoid' has changed. Saved a reverse patch to Sigmoid.patch. Runpatch -p0 < Sigmoid.patch
to revert your changes. warnings.warn(msg, SourceChangeWarning) /usr/local/lib/python3.8/dist-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.dropout.Dropout' has changed. Saved a reverse patch to Dropout.patch. Runpatch -p0 < Dropout.patch
to revert your changes. warnings.warn(msg, SourceChangeWarning) /usr/local/lib/python3.8/dist-packages/torch/serialization.py:868: SourceChangeWarning: source code of class 'torch.nn.modules.batchnorm.BatchNorm1d' has changed. Saved a reverse patch to BatchNorm1d.patch. Runpatch -p0 < BatchNorm1d.patch
to revert your changes. warnings.warn(msg, SourceChangeWarning) Traceback (most recent call last): File "test_wholeimage_swapsingle.py", line 51, inthanks!!