Closed nanke4869 closed 3 years ago
Sorry I delete the original conda environment, so that I cannot give you the full package list. As I can remember, the torch version we use is 1.2.0, the transformers version is 3.0.2
Sorry I delete the original conda environment, so that I cannot give you the full package list. As I can remember, the torch version we use is 1.2.0, the transformers version is 3.0.2
😁Thanks for your reply. I've tried some environments and run through your code.
Traceback (most recent call last): File "train.py", line 120, in
train(model, train_loader, valid_loader, optim, checkpoint, args)
File "/home/pybuaa/MY/BUAA2/CourtView/BART/trainer.py", line 47, in train
temp_F1 = evaluation(model, validation_data, args)
File "/home/pybuaa/MY/BUAA2/CourtView/BART/trainer.py", line 70, in evaluation
summary_ids = model.generate(src_ids, num_beams=4, max_length=150, early_stopping=True)
File "/home/pybuaa/Application/Anaconda3/envs/torch4/lib/python3.6/site-packages/torch/autograd/grad_mode.py", line 43, in decorate_no_grad
return func(*args, **kwargs)
File "/home/pybuaa/Application/Anaconda3/envs/torch4/lib/python3.6/site-packages/transformers/generation_utils.py", line 352, in generate
if (attention_mask is None) and (pad_token_id is not None) and (pad_token_id in input_ids):
RuntimeError: bool value of Tensor with more than one value is ambiguous