Skip to content

Commit

Permalink
Add missing key to TFLayoutLM signature (huggingface#28640)
Browse files Browse the repository at this point in the history
Fix missing bbox in LayoutLM signature
  • Loading branch information
Rocketknight1 authored and AjayP13 committed Jan 22, 2024
1 parent ab49da5 commit 2fc1cb2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/transformers/models/layoutlm/modeling_tf_layoutlm.py
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,12 @@ class TFLayoutLMPreTrainedModel(TFPreTrainedModel):
config_class = LayoutLMConfig
base_model_prefix = "layoutlm"

@property
def input_signature(self):
signature = super().input_signature
signature["bbox"] = tf.TensorSpec(shape=(None, None, 4), dtype=tf.int32, name="bbox")
return signature


LAYOUTLM_START_DOCSTRING = r"""
Expand Down

0 comments on commit 2fc1cb2

Please sign in to comment.