Skip to content
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

Bug fix: 'ArgsParser' object has no attribute 'reg_loss' #38

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aniruddhapal211316
Copy link

Issue :

while running the pretrained model using clean.py or run_segan+_clean.sh , it shows an error AttributeError: 'ArgsParser' object has no attribute 'reg_loss' .
This same problem was also reported earlier in this repo, here is the link for it: #36

Fix:

added "reg_loss": "l1_loss", in segan_pytorch/ckpt_segan+/train.opts

Due to this commit 9ade47b , a new command line option --reg_loss was added for training the model which initialized a variable self.reg_loss present in segan/models/model.py in class SEGAN to l1_loss or mse_loss depending on the command line argument passed by the user.

But the pretrained model was trained before that commit was made therefore it was trained without using --reg_loss option in command line and self.reg_loss was initialized to l1_loss. All the command line arguments used for training the pretrained model are stored in segan_pytorch/ckpt_segan+/train.opts and are loaded again when using the pretrained model using clean.py. So by adding "reg_loss": "l1_loss", in segan_pytorch/ckpt_segan+/train.opts solves this issue.

@woshiZS
Copy link

woshiZS commented Aug 29, 2022

@aniruddhapal211316
sorry to bother you, the pre-trained model link in README seems to be empty? Where to find the pre-trained model ?
any reply will be appreciated !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants