How to measure accuracy while fine-tuning bert-base model?
Hello everybody,While I am fine-tunning ‘dbmdz/bert-base-turkish-uncased model’, I can see the loss value during training the model as below:outputs = model(b_input_ids, attention_mask=b_input_mask, labels=b_labels)
loss = outputs[0]  #  get lossbut I could not measure accuracy value during training the model.any suggestion, please?
2021-07-22T04:24:07Z
I’m not sure if it’s possible to print metrics with that object, but withmodel.fitit automatically displays the metrics as in TensorFlow.Check out thecourse pageHowever, I don’t know if it’s possible to include the attention layers here as you do in your example.model.fit(
    x=training['train']['input_ids'],
    y=training['labels_train'], 
    validation_data=(
        validation['valid']['input_ids'],
        validation['labels_test'],
    )
    ,batch_size = batch_size
    ,epochs = epochs
)