Comments (9)
Always use 5e-5 to fine-tune Transformer-based models ;)
from transformers-tutorials.
thanks for your reply.
I had a balanced dataset . I have solved the issue. The problem was the learning rate . I changed different learning rates and trained for longer epochs and now the model seems to predict different classes.
from transformers-tutorials.
You can leverage LayoutLMv2FeatureExtractor
for LayoutXLM (as the image-related part is the same), however, the tokenizer for LayoutXLM is based on XLM-RoBERTa. So you would have to use the following tokenizer:
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("microsoft/layoutxlm-base")
So you would have to use both the feature extractor and tokenizer separately, there's no processor defined for it, for now.
from transformers-tutorials.
The model's training accuracy was above 90% after certain epochs , but it is always predicting the same class.
So you do have a very imbalanced dataset (i.e. a lot more samples of a given class compared to another class)?
from transformers-tutorials.
the issue was solved and closed
from transformers-tutorials.
yes sure ...thanks...
I have another question.
Can you please tell me how to load Layoutlxlm model (multilingual) ?
What is the tokenizer , feature extractor and processor for Layoutxlm ?
from transformers-tutorials.
Thank you for the clear explanation @NielsRogge
from transformers-tutorials.
Hai @Jerome-Michael
I am also facing the same issue can you please share what learning rate you used and how many classes you have in your dataset and how you balanced the dataset.
Thanking you in advance.
from transformers-tutorials.
Hi @Laxmi530 .
I think I used 1e-5 . I trained for little more epochs around 50. I had 3 classes. totally balanced
from transformers-tutorials.
Related Issues (20)
- Donut fine tuning using Huggingface accelerate
- UDOP Document Generation & Editing HOT 2
- fine-tune the model
- UDOP FUNSD , not able to perform Inference HOT 2
- LayoutLM prediction with confidence score? HOT 1
- Table transformer crop issue
- UDOP - How to change UdopToknizer to another tokenizer that supports CJK languages? HOT 1
- How can we Fine Tune Pix2StruCt for DocVQA task?
- UDOP - Is it possible to get several bboxes from one single input ?
- [Bug] Owlv2 Zero-shot object detection
- True Inference with Layoutlmv3 HOT 2
- Huge negative loss while fine-tuning SAM HOT 2
- Grounding Dino - Multiple Class HOT 3
- Fine tune TrOCR on IAM Handwriting Database using Seq2SeqTrainer HOT 13
- [Finetuning OneFormer] How to use multiple GPUs
- can't login to push hub model
- Mask2Former panoptic fine-tune HOT 3
- SAM Instance segmentation Finetuning output mask with instance lablel
- Table transformer demo not handling empty cells
- "Unused or unrecognized kwargs: padding" error when running notebook example
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from transformers-tutorials.