cgpotts / cs224u

Code for Stanford CS224u

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Should set return_dict=True for bert_model in finetuning.ipynb

wwwennn opened this issue · comments

Hi there,

I noticed that this line should be changed to

reps = bert_model(X_example, attention_mask=X_example_mask, return_dict=True)

for the following cells to work.

Thank you,
Wen

@wwwennn Thanks for the note! This isn't the behavior I see. Can you verify that you are using transformers==4.3.3?

You're right. I was running with transformers=3.4. Things work fine after switching to 4.3.3