AttributeError: ‘str’ object has no attribute ‘shape’ while encoding tensor using BertModel with PyTorch (Hugging Face)
AttributeError: ‘str’ object has no attribute ‘shape’ while encoding tensor using BertModel with PyTorch (Hugging Face). Below is the code bert_model = BertModel.from_pretrained(r’downloadsbert-…