COCON_ICLR2021 icon indicating copy to clipboard operation
COCON_ICLR2021 copied to clipboard

'cocon_block' has no attribute 'cocon_attn'

Open wying8349 opened this issue 3 years ago • 2 comments

We meet a problem like this: Traceback (most recent call last): File "traininfer_cocon.py", line 2980, in main() File "traininfer_cocon.py", line 2783, in main global_step, tr_loss = train_cocon(args, train_dataset, model, tokenizer, cocon_block=cocon_block, disc_model=disc_model, model_config=config, transform_h_after_layernorm=args.transform_h_after_layernorm) File "traininfer_cocon.py", line 573, in train_cocon self_cocon_lm_loss_grad = torch.autograd.grad(self_cocon_lm_loss, cocon_block.cocon_attn.c_attn.weight, retain_graph=True)[0] File "/home/yingwenjing/anaconda3/envs/cocon/lib/python3.7/site-packages/torch/nn/modules/module.py", line 576, in getattr type(self).name, name)) AttributeError: 'DataParallel' object has no attribute 'cocon_attn'

We sincerely look forward to your reply.

wying8349 avatar Dec 29 '21 02:12 wying8349

I have same question

GGG-c avatar Jan 03 '22 12:01 GGG-c

I have the same question when running "traininfer_cocon.py"

janleemark avatar Jun 23 '22 09:06 janleemark