on-internet
← Community

_batch_encode_plus() got an unexpected keyword argument 'return_attention_masks'

Stack Overflow ·

I am studying RoBERTA model to detect emotions in tweets. On Google colab. Following this Noteboook file from Kaggle - https://www.kaggle.com/ishivinal/tweet-emotions-analysis-using-lstm-glove-roberta?scriptVersionId=38608295 Code snippet: def regular_encode(texts, tokenizer, maxlen=512): enc_di = tokenizer.batch_encode_plus( texts, return_attention_masks=True, return_token_type_ids=False, pad_to_max_length=True, #padding=True, max_length=maxlen ) return np.array(enc_di['input_ids']) def build_model(transformer, max_len=160): input_word_ids = Input(shape=(max_len,), dtype=tf.int32, name="input

Comments

Sign in or sign up to comment and upvote.

No comments yet.