I have been using bert and trying to compile the model using the below line of code.
model = TFBertForSequenceClassification.from_pretrained('bert-base-uncased')
optimizer = tf.keras.optimizers.Adam(learning_rate=learning_rate, epsilon=1e-08)
loss = tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True)
metric = tf.keras.metrics.SparseCategoricalAccuracy('accuracy')
callbacks = [tf.keras.callbacks.ModelCheckpoint(filepath=OUTPUT_FOLDER+"\\bert_model.h5",
save_weights_only=True,
monitor='val_loss',
mode='min',
save_best_only=True)]
model.compile(optimizer=optimizer, loss=loss, metrics=[metric])
While compiling the code, I get the type error.
TypeError: Invalid keyword argument(s) in compile: {'steps_per_execution'}
The transformers package version im currently using is 4.11.3. The above code worked like a charm when I used tranformers 4.10.2
How do i get this to work with 4.11.3?