SimSwap
SimSwap copied to clipboard
AttributeError: 'EfficientNet' object has no attribute 'act1'
when I run this command: python train.py --name simswap224_test --batchSize 8 --gpu_ids 1 --dataset vggface2 --Gdeep False
an erroe occurred:
/home/zhang/anaconda3/envs/Sim/lib/python3.7/site-packages/torch/serialization.py:656: SourceChangeWarning: source code of class 'torch.nn.parallel.data_parallel.DataParallel' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/zhang/anaconda3/envs/Sim/lib/python3.7/site-packages/torch/serialization.py:656: SourceChangeWarning: source code of class 'torch.nn.modules.conv.Conv2d' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/zhang/anaconda3/envs/Sim/lib/python3.7/site-packages/torch/serialization.py:656: SourceChangeWarning: source code of class 'torch.nn.modules.batchnorm.BatchNorm2d' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/zhang/anaconda3/envs/Sim/lib/python3.7/site-packages/torch/serialization.py:656: SourceChangeWarning: source code of class 'torch.nn.modules.activation.PReLU' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/zhang/anaconda3/envs/Sim/lib/python3.7/site-packages/torch/serialization.py:656: SourceChangeWarning: source code of class 'torch.nn.modules.pooling.MaxPool2d' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/zhang/anaconda3/envs/Sim/lib/python3.7/site-packages/torch/serialization.py:656: SourceChangeWarning: source code of class 'torch.nn.modules.container.Sequential' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/zhang/anaconda3/envs/Sim/lib/python3.7/site-packages/torch/serialization.py:656: SourceChangeWarning: source code of class 'torch.nn.modules.pooling.AdaptiveAvgPool2d' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/zhang/anaconda3/envs/Sim/lib/python3.7/site-packages/torch/serialization.py:656: SourceChangeWarning: source code of class 'torch.nn.modules.linear.Linear' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/zhang/anaconda3/envs/Sim/lib/python3.7/site-packages/torch/serialization.py:656: SourceChangeWarning: source code of class 'torch.nn.modules.activation.Sigmoid' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/zhang/anaconda3/envs/Sim/lib/python3.7/site-packages/torch/serialization.py:656: SourceChangeWarning: source code of class 'torch.nn.modules.dropout.Dropout' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/zhang/anaconda3/envs/Sim/lib/python3.7/site-packages/torch/serialization.py:656: SourceChangeWarning: source code of class 'torch.nn.modules.batchnorm.BatchNorm1d' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
Traceback (most recent call last):
File "train.py", line 139, in
Can you help me solve this issue?
https://github.com/neuralchen/SimSwap/issues/307#issuecomment-1198829625
https://github.com/neuralchen/SimSwap/blob/dd1ecdd2a718636d33977ab3097a69a0ecf080d8/pg_modules/projector.py#L35
Thank you for you reply, I have run it successfully.
But now I have new question, because I just want to run it successfully and finish the train process as fast as possible, so I modify epoch=1 and total_step=500,then an orror occurred:
"See the documentation of nn.Upsample for details.".format(mode)
( step: 199, ) G_Loss: 7.392 G_ID: 0.942 G_Rec: 11.906 G_feat_match: 2.901 D_fake: 0.006 D_real: 0.144 D_loss: 0.150
( step: 399, ) G_Loss: 5.804 G_ID: 1.007 G_Rec: 10.470 G_feat_match: 2.805 D_fake: 0.033 D_real: 0.025 D_loss: 0.058
Traceback (most recent call last):
File "train.py", line 290, in
Can you help me fixed this issue?
I have solved this problem by the follwing steps: pip install wandb. And add import wandb in train.py
actually no need to install wandb. as the author doesn't use it at all. I just comment it
Use: pip3 install -U timm==0.5.4
https://github.com/neuralchen/SimSwap/issues/426#issuecomment-1672843900