'How do I retrain BERT model with new data

I have already trained a bert model and saved it in the .pb format and I want to retrain the model with new datasets that i custom made, so in order to not to lose the previous training and such, how do I train the model with the new data so the model could update it self any approaches? this is my training code down below

optimizer = Adam(lr=1e-5, decay=1e-6)
model.compile(loss='binary_crossentropy',
                  optimizer=optimizer,
                  metrics=['accuracy'])    
history = model.fit(
        x={'input_ids': x['input_ids'], 'attention_mask': x['attention_mask']},
        #x={'input_ids': x['input_ids']},
        y={'outputs': train_y},
        validation_split=0.1,
        batch_size=32,
        epochs=1)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source