LayoutLM: add exception handling for bbox values (#7452)
* LayoutLM: add exception handling for bbox values To replicate unhandled error: - In `test_modelling_layoutlm.py` set `range_bbox=1025`, i.e. greater 1024 - Run `pytest tests/test_modeling_layoutlm.py` Requirement for bbox values to be within the range 0-1000 is documented but if it is violated then it isa not clear what is the issue from error message. * Update src/transformers/modeling_layoutlm.py Co-authored-by:Lysandre Debut <lysandre@huggingface.co> Co-authored-by:
Lysandre Debut <lysandre@huggingface.co>
Showing
Please register or sign in to comment