ShipengWang / Adam-NSCL

PyTorch implementation of our Adam-NSCL algorithm from our CVPR2021 (oral) paper "Training Networks in Null Space for Continual Learning"
MIT License
50 stars 2 forks source link

KeyError: 'lam' #1

Closed slcheng97 closed 3 years ago

slcheng97 commented 3 years ago

当我运行你们的代码时,碰到了下面的问题,请问是什么原因导致的呢? Traceback (most recent call last): File "main.py", line 237, in acc_table, task_names = run(args) File "main.py", line 101, in run agent.train_task(train_loader, val_loader) File "/home/slcheng/code/Adam-NSCL-main/svd_agent/svd_agent.py", line 61, in train_task self.train_model(train_loader, val_loader) File "/home/slcheng/code/Adam-NSCL-main/svd_agent/agent.py", line 170, in train_model losses, acc = self.train_epoch(train_loader, epoch, count_cls_step) File "/home/slcheng/code/Adam-NSCL-main/svd_agent/agent.py", line 135, in train_epoch self.model_optimizer.step() File "/home/slcheng/anaconda3/envs/votenet/lib/python3.7/site-packages/torch/optim/lr_scheduler.py", line 36, in wrapper return func(*args, **kwargs) File "/home/slcheng/code/Adam-NSCL-main/optim/adam_svd.py", line 80, in step lam = group['lam'] KeyError: 'lam'

ShipengWang commented 3 years ago

'lam' is a hyperparameter with no use, I have remove it in the code.