prateekjoshi565 / Fine-Tuning-BERT

Apache License 2.0
139 stars 119 forks source link

Preds returned is a tuple of float tensors #5

Open WeeHyongTok opened 3 years ago

WeeHyongTok commented 3 years ago

get model predictions for the current batch

preds = model(sent_id, mask)

# compute the loss between actual and predicted values
loss = cross_entropy(preds, labels)

When train is invoked , I see the following error - AttributeError: 'tuple' object has no attribute 'dim'