Is there anyone who successfully use DeBERTa with model.fit?
When I use fit, the following error is raised.
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/app/plm_finetune/__main__.py", line 46, in <module>
tasks[args.task].run(config)
File "/app/plm_finetune/abusing/train.py", line 267, in run
model.fit(
File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 67, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/framework/func_graph.py", line 1129, in autograph_handler
raise e.ag_error_metadata.to_exception(e)
ValueError: in user code:
File "/usr/local/lib/python3.8/dist-packages/keras/engine/training.py", line 878, in train_function *
return step_function(self, iterator)
File "/usr/local/lib/python3.8/dist-packages/keras/engine/training.py", line 867, in step_function **
outputs = model.distribute_strategy.run(run_step, args=(data,))
File "/usr/local/lib/python3.8/dist-packages/keras/engine/training.py", line 860, in run_step **
outputs = model.train_step(data)
File "/usr/local/lib/python3.8/dist-packages/keras/engine/training.py", line 808, in train_step
y_pred = self(x, training=True)
File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 67, in error_handler
raise e.with_traceback(filtered_tb) from None
ValueError: Exception encountered when calling layer "text_classification_head" (type TextClassificationHead).
in user code:
File "/app/plm_finetune/common/heads.py", line 32, in call *
encoder_outputs = self.model(plm_input_features, training=training)
File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 67, in error_handler **
raise e.with_traceback(filtered_tb) from None
ValueError: Exception encountered when calling layer "tf_deberta_model" (type TFDebertaModel).
in user code:
File "/usr/local/lib/python3.8/dist-packages/transformers/modeling_tf_utils.py", line 1093, in run_call_with_unpacked_inputs *
return func(self, **unpacked_inputs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/deberta/modeling_tf_deberta.py", line 1099, in call *
outputs = self.deberta(
File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 67, in error_handler **
raise e.with_traceback(filtered_tb) from None
ValueError: Exception encountered when calling layer "deberta" (type TFDebertaMainLayer).
in user code:
File "/usr/local/lib/python3.8/dist-packages/transformers/modeling_tf_utils.py", line 1093, in run_call_with_unpacked_inputs *
return func(self, **unpacked_inputs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/deberta/modeling_tf_deberta.py", line 957, in call *
encoder_outputs = self.encoder(
File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 67, in error_handler **
raise e.with_traceback(filtered_tb) from None
ValueError: Exception encountered when calling layer "encoder" (type TFDebertaEncoder).
in user code:
File "/usr/local/lib/python3.8/dist-packages/transformers/models/deberta/modeling_tf_deberta.py", line 359, in call *
layer_outputs = layer_module(
File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 67, in error_handler **
raise e.with_traceback(filtered_tb) from None
ValueError: Exception encountered when calling layer "layer_._0" (type TFDebertaLayer).
in user code:
File "/usr/local/lib/python3.8/dist-packages/transformers/models/deberta/modeling_tf_deberta.py", line 270, in call *
attention_outputs = self.attention(
File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 67, in error_handler **
raise e.with_traceback(filtered_tb) from None
ValueError: Exception encountered when calling layer "attention" (type TFDebertaAttention).
in user code:
File "/usr/local/lib/python3.8/dist-packages/transformers/models/deberta/modeling_tf_deberta.py", line 205, in call *
attention_output = self.dense_output(
File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 67, in error_handler **
raise e.with_traceback(filtered_tb) from None
ValueError: Exception encountered when calling layer "output" (type TFDebertaSelfOutput).
in user code:
File "/usr/local/lib/python3.8/dist-packages/transformers/models/deberta/modeling_tf_deberta.py", line 171, in call *
hidden_states = self.dense(hidden_states)
File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 67, in error_handler **
raise e.with_traceback(filtered_tb) from None
File "/usr/local/lib/python3.8/dist-packages/keras/layers/core/dense.py", line 139, in build
raise ValueError('The last dimension of the inputs to a Dense layer '
ValueError: The last dimension of the inputs to a Dense layer should be defined. Found None. Full input shape received: (None, 128, None)
Call arguments received:
• hidden_states=tf.Tensor(shape=(None, 128, None), dtype=float32)
• input_tensor=tf.Tensor(shape=(None, 128, 768), dtype=float32)
• training=True
Call arguments received:
• input_tensor=tf.Tensor(shape=(None, 128, 768), dtype=float32)
• attention_mask=tf.Tensor(shape=(None, 1, 128, 128), dtype=uint8)
• query_states=None
• relative_pos=None
• rel_embeddings=None
• output_attentions=False
• training=True
Call arguments received:
• hidden_states=tf.Tensor(shape=(None, 128, 768), dtype=float32)
• attention_mask=tf.Tensor(shape=(None, 1, 128, 128), dtype=uint8)
• query_states=None
• relative_pos=None
• rel_embeddings=None
• output_attentions=False
• training=True
Call arguments received:
• hidden_states=tf.Tensor(shape=(None, 128, 768), dtype=float32)
• attention_mask=tf.Tensor(shape=(None, 128), dtype=float32)
• query_states=None
• relative_pos=None
• output_attentions=False
• output_hidden_states=False
• return_dict=True
• training=True
Call arguments received:
• self=tf.Tensor(shape=(None, 128), dtype=int32)
• input_ids=None
• attention_mask=tf.Tensor(shape=(None, 128), dtype=float32)
• token_type_ids=None
• position_ids=None
• inputs_embeds=None
• output_attentions=False
• output_hidden_states=False
• return_dict=True
• training=True
Call arguments received:
• self=('tf.Tensor(shape=(None, 128), dtype=int32)', 'tf.Tensor(shape=(None, 128), dtype=float32)')
• input_ids=None
• attention_mask=None
• token_type_ids=None
• position_ids=None
• inputs_embeds=None
• output_attentions=None
• output_hidden_states=None
• return_dict=None
• training=True
Call arguments received:
• plm_input_features=('tf.Tensor(shape=(None, 128), dtype=int32)', 'tf.Tensor(shape=(None, 128), dtype=float32)')
• training=True