I'm trying to reproduce the baseline which is without embedding of descriptions of codes. In icd_mode.py, I set the label_feat equals to None. But it shows error when I run the code. How can I reproduce it?
This is the error:
Traceback (most recent call last):
File "main.py", line 254, in
main()
File "main.py", line 251, in main
run(args)
File "main.py", line 87, in run
epoch_dev_metric, epoch_test_metric, steps = train_one_epoch(model, steps, train_dataloader, dev_dataloader, test_dataloader, optimizer, scheduler_step, args, accelerator)
File "main.py", line 155, in train_one_epoch
ori_loss = model(batch_gpu, rdrop=args.rdrop_alpha > 0.0)
File "/mnt/iusers01/fatpou01/compsci01/f06585ml/anaconda3/envs/MSMN/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, *kwargs)
File "/mnt/iusers01/fatpou01/compsci01/f06585ml/ICD-MSMN/model/icd_model.py", line 56, in forward
return self.forward_rdrop(batch)
File "/mnt/iusers01/fatpou01/compsci01/f06585ml/ICD-MSMN/model/icd_model.py", line 93, in forward_rdrop
c_logits0 = self.decoder(hidden0, word_mask, label_feat = None)
File "/mnt/iusers01/fatpou01/compsci01/f06585ml/anaconda3/envs/MSMN/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(input, **kwargs)
File "/mnt/iusers01/fatpou01/compsci01/f06585ml/ICD-MSMN/model/decoder.py", line 205, in forward
m = self.get_label_queried_features(h, word_mask, label_feat)
File "/mnt/iusers01/fatpou01/compsci01/f06585ml/ICD-MSMN/model/decoder.py", line 240, in get_label_queried_features
u_reshape = self.u_reduce(label_feat.reshape(label_count, self.attention_head, att_dim))
RuntimeError: shape '[4, 8, 512]' is invalid for input of size 19968
Hi Authors,
I'm trying to reproduce the baseline which is without embedding of descriptions of codes. In icd_mode.py, I set the label_feat equals to None. But it shows error when I run the code. How can I reproduce it?
ignore mc_logits
Many thanks! Best wishes, Mingyang