Created
February 2, 2021 03:40
-
-
Save RayWilliam46/f47927bb02cf7804e4e311296357102f to your computer and use it in GitHub Desktop.
Train weights of classification head with DistilBERT layers frozen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EPOCHS = 6 | |
BATCH_SIZE = 64 | |
NUM_STEPS = len(X_train.index) // BATCH_SIZE | |
# Train the model | |
train_history1 = model.fit( | |
x = [X_train_ids, X_train_attention], | |
y = y_train.to_numpy(), | |
epochs = EPOCHS, | |
batch_size = BATCH_SIZE, | |
steps_per_epoch = NUM_STEPS, | |
validation_data = ([X_valid_ids, X_valid_attention], y_valid.to_numpy()), | |
verbose=2 | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment