NielsRogge / Transformers-Tutorials

This repository contains demos I made with the Transformers library by HuggingFace.
MIT License
9.56k stars 1.46k forks source link

Tensor size mismatch for table detection in PDF #432

Open sanakashgouli opened 5 months ago

sanakashgouli commented 5 months ago

Hi @NielsRogge,

Thanks for the great work on the table transformer notebook.

I've been working on modifying the code in the notebook to detect tables in a PDF (treating every page as an image), however, for the structure recognition part I encounter the following error:

RuntimeError: The size of tensor a (125) must match the size of tensor b (4) at non-singleton dimension 2.

Could you kindly guide me on what the problem might be?

Thanks!