MinTL
MinTL copied to clipboard
AttributeError: 'str' object has no attribute 'size'
thank you for this work.
During train the model, I got this error
Traceback (most recent call last):
File "/content/drive/MyDrive/MinTL/train.py", line 388, in <module>
main()
File "/content/drive/MyDrive/MinTL/train.py", line 377, in main
m.train()
File "/content/drive/MyDrive/MinTL/train.py", line 130, in train
lm_labels=inputs["response"]
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/content/drive/MyDrive/MinTL/T5.py", line 69, in forward
head_mask=head_mask,
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/transformers/models/t5/modeling_t5.py", line 924, in forward
encoder_batch_size, encoder_sequence_length, _ = encoder_hidden_states.size()
AttributeError: 'str' object has no attribute 'size'
what can I do to solve it ? please