My own dataset fine-tuning
Hi, in these days I was able to extract embeddings for every token of my own dataset for tone/mood analysis (I have 5 labels). I have seen that you insert an example of fine-tuning for MRPC dataset, but it has a different number of labels from mine. How can I apply a fine-tuning for my own dataset, starting from BERT embedding?
Thanks
The classification layer is always added at fine-tuning time, so it can be any size you want. For example, in run_pretraining.py MRPC is 2-label and MNLI is 3-label. If you're doing a sentence-level classification task the recommended way is end-to-end fine tuning as is done with run_pretraining.py. In fact you can add your own DataProcessor and not have any TensorFlow code.
For token-level tasks, see the README for a recommendation of how to project the labels through BERT tokenization.
@jacobdevlin-google it would be nice to detail this approach in a specific tutorial.
@jacobdevlin-google I don't see any DataProcessor examples in run_pretraining.py. I think you meant in run_classifier.py, am I wrong?