question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Demo notebook for LayoutLMForSequenceClassification

See original GitHub issue

Hey there,

I’ve recently improved LayoutLM in the HuggingFace Transformers library by adding some more documentation + code examples, a demo notebook that illustrates how to fine-tune LayoutLMForTokenClassification on the FUNSD dataset, some integration tests that verify whether the implementation in HuggingFace Transformers gives the same output tensors on the same input data as the original implementation, and finally LayoutLMForSequenceClassification. My PR was merged yesterday 😃

However, now I’m also preparing a notebook that illustrates how to fine-tune LayoutLMForSequenceClassification on (a small subset of) the RVL-CDIP dataset. However, it doesn’t seem to be able to overfit the tiny subset (I have 16 images per class, so as there are 16 labels I have 256 training examples). You can run it here: https://colab.research.google.com/drive/1DUpTi2aL64AuIJ_9g6dGgKfltEEFqQbt?usp=sharing

Any feedback is greatly appreciated!

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:16
  • Comments:13

github_iconTop GitHub Comments

6reactions
NielsRoggecommented, Jan 14, 2021

Btw, the demo notebook for fine-tuning LayoutLMForTokenClassification on the FUNSD dataset can be found here.

2reactions
NielsRoggecommented, Apr 17, 2021

Hi @monuminu @VishnuGopireddy I have a new notebook that adds visual features from a Resnet-101 backbone in addition to the text + layout features. You can find it here: https://github.com/NielsRogge/Transformers-Tutorials/blob/master/LayoutLM/Add_image_embeddings_to_LayoutLM.ipynb

It relies entirely on HuggingFace Transformers, no need for the unilm repo anymore 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

LayoutLM - Hugging Face
For a demo which shows how to fine-tune LayoutLMForTokenClassification on the FUNSD dataset (a collection of annotated forms), see this notebook.
Read more >
NielsRogge/Transformers-Tutorials - [REPO]@Telematika
This repository contains demos I made with the Transformers library by ... fine-tuning LayoutLMForSequenceClassification on the RVL-CDIP ...
Read more >
NielsRogge / Transformers-Tutorials | Run on Gradient
This repository contains demos I made with the Transformers library by ... for computer vision (June 2022), refer to this notebook with corresponding...
Read more >
Notebooks · GitBook - GitHub Pages
Demo Notebooks. We have put together a number of notebooks to demonstrate MLeap usage with Spark, Scikit and soon TensorFlow. The demo notebooks...
Read more >
LayoutLM Explained - Nanonets
schedule a demo Get Started ... from transformers import LayoutLMTokenizer, LayoutLMForSequenceClassification. import torch.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found