# Using the same dataset for fine-tuning and training

**URL:** <https://discuss.huggingface.co/t/using-the-same-dataset-for-fine-tuning-and-training/17299>\
**Category:** Beginners\
**Created:** [April 28, 2022, 4:42pm UTC](https://discuss.huggingface.co/t/using-the-same-dataset-for-fine-tuning-and-training/17299 "2022-04-28T16:42:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NajlaKSA](https://avatars.discourse-cdn.com/v4/letter/n/4491bb/32.png) [@NajlaKSA](https://discuss.huggingface.co/u/NajlaKSA)\
**Post date:** [April 28, 2022, 4:42pm UTC](https://discuss.huggingface.co/t/using-the-same-dataset-for-fine-tuning-and-training/17299/1 "2022-04-28T16:42:08Z")

</div>

Hi, I’m working on a project that utilizes BERT model.

initially, I have split the dataset 80/20 training/testing.  
then I used the training split for fine-tuning the BERT model using Trainer, and testing was passed for validation.  
after that, I have extracted the BERT embeddings, and stacked it on a TF model, then compiled it, **then trained it using the same portion of data used for the fine-tuning**

my question is:  
is it OK to use the same data portion for **fine-tuning** AND **training**?  
would that cause over-fitting?

I searched for similar posts but I couldn’t find any answer,  
thanks in advance.

---

<div class="post-metadata">

**Author:** ![BramVanroy](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/bramvanroy/32/47360_2.png) [@BramVanroy](https://discuss.huggingface.co/u/BramVanroy)\
**Post date:** [April 29, 2022, 7:40am UTC](https://discuss.huggingface.co/t/using-the-same-dataset-for-fine-tuning-and-training/17299/2 "2022-04-29T07:40:03Z")

</div>

As long as you have one held-out set that is never used for during-training-evaluation (only as a final test set), that’s okay. It’s not different from training for multiple epochs.

---

<div class="post-metadata">

**Author:** ![NajlaKSA](https://avatars.discourse-cdn.com/v4/letter/n/4491bb/32.png) [@NajlaKSA](https://discuss.huggingface.co/u/NajlaKSA)\
**Post date:** [May 7, 2022, 2:02pm UTC](https://discuss.huggingface.co/t/using-the-same-dataset-for-fine-tuning-and-training/17299/3 "2022-05-07T14:02:06Z")

</div>

Perfect!, Thanks a lot.
