i’m trying to follow the huggingface datasets tutorial to finetune a BERT model on a custom dataset for sentiment analysis. The quicktour states:
rename our label column in labels which is the expected input name for labels in BertForSequenceClassification.
In the docs for
to_tf_dataset it states:
label_cols – Dataset column(s) to load as labels. Note that many models compute loss internally rather than letting Keras do it, in which case it is not necessary to actually pass the labels here, as long as they’re in the input columns.
I am uncertain if
label_cols can be used to specify labels for differently named columns, or if it only possible to pass labels with a column named
label inside the