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

NameError: name 'logger' is not defined #26

Open
MaQingya opened this issue Apr 22, 2021 · 3 comments
Open

NameError: name 'logger' is not defined #26

MaQingya opened this issue Apr 22, 2021 · 3 comments

Comments

@MaQingya
Copy link

CUDA_VISIBLE_DEVICES=1 python baseline_ck_plus.py --fold 10
1.2.0
22-Apr-2021-10-17-35 --- args ---
baseline ck+ dataset, learning rate: 0.1
Traceback (most recent call last):
File "baseline_ck_plus.py", line 155, in
main()
File "baseline_ck_plus.py", line 45, in main
train(train_loader, model, optimizer, epoch)
File "baseline_ck_plus.py", line 91, in train
logger.print('Epoch: [{:3d}][{:3d}/{:3d}]\t'
NameError: name 'logger' is not defined
When I look at line 22: logger = util.Logger('./log/','baseline_ckplus')
What's this ?

@hqn19971113
Copy link

hqn19971113 commented Jul 31, 2021

兄弟,他在train和main里面少传了个logger的参数
在47,48行的train(train_loader,model,optimizer,epoch,logger
在62行def train(train_loader,model,optimizer,epoch,logger
114行也在后面加个logger

@Open-Debin
Copy link
Owner

logger

thanks for your explanation.

@Tina-xiao
Copy link

谢谢!

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

No branches or pull requests

4 participants