We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
TypeError Traceback (most recent call last) Cell In[3], line 48 45 batch_dict = tokenizer(input_texts, max_length=max_length-1, padding=True, truncation=True, return_tensors='pt') 47 # Important! Adding EOS token at the end ---> 48 batch_dict['input_ids'] = [input_ids + [tokenizer.eos_token_id] for input_ids in batch_dict['input_ids']] 49 batch_dict = tokenizer.pad(batch_dict, padding=True, return_attention_mask=True, return_tensors='pt').to("cuda") 51 model.eval()
Cell In[3], line 48 45 batch_dict = tokenizer(input_texts, max_length=max_length-1, padding=True, truncation=True, return_tensors='pt') 47 # Important! Adding EOS token at the end ---> 48 batch_dict['input_ids'] = [input_ids + [tokenizer.eos_token_id] for input_ids in batch_dict['input_ids']] 49 batch_dict = tokenizer.pad(batch_dict, padding=True, return_attention_mask=True, return_tensors='pt').to("cuda") 51 model.eval()
TypeError: unsupported operand type(s) for +: 'Tensor' and 'list'
The text was updated successfully, but these errors were encountered:
No branches or pull requests
TypeError Traceback (most recent call last)
Cell In[3], line 48
45 batch_dict = tokenizer(input_texts, max_length=max_length-1, padding=True, truncation=True, return_tensors='pt')
47 # Important! Adding EOS token at the end
---> 48 batch_dict['input_ids'] = [input_ids + [tokenizer.eos_token_id] for input_ids in batch_dict['input_ids']]
49 batch_dict = tokenizer.pad(batch_dict, padding=True, return_attention_mask=True, return_tensors='pt').to("cuda")
51 model.eval()
Cell In[3], line 48
45 batch_dict = tokenizer(input_texts, max_length=max_length-1, padding=True, truncation=True, return_tensors='pt')
47 # Important! Adding EOS token at the end
---> 48 batch_dict['input_ids'] = [input_ids + [tokenizer.eos_token_id] for input_ids in batch_dict['input_ids']]
49 batch_dict = tokenizer.pad(batch_dict, padding=True, return_attention_mask=True, return_tensors='pt').to("cuda")
51 model.eval()
TypeError: unsupported operand type(s) for +: 'Tensor' and 'list'
The text was updated successfully, but these errors were encountered: