microsoft / unilm

Large-scale Self-supervised Pre-training Across Tasks, Languages, and Modalities
https://aka.ms/GeneralAI
MIT License
19.09k stars 2.44k forks source link

LayoutLM model cannot import name 'LayoutlmConfig' #1518

Open qiujiu123 opened 2 months ago

qiujiu123 commented 2 months ago

Describe Model I am using (UniLM, MiniLM, LayoutLM ...):LayoutLM When i using the code: python run_seq_labeling.py --data_dir data \ --model_type layoutlm \ --model_name_or_path path/to/pretrained/model/directory \ --do_lower_case \ --max_seq_length 512 \ --do_train \ --num_train_epochs 100.0 \ --logging_steps 10 \ --save_steps -1 \ --output_dir path/to/output/directory \ --labels data/labels.txt \ --per_gpu_train_batch_size 16 \ --per_gpu_eval_batch_size 16 \ --fp16 there is a problem : File "run_seq_labeling.py", line 52, in from layoutlm import FunsdDataset, LayoutlmConfig, LayoutlmForTokenClassification ImportError: cannot import name 'LayoutlmConfig' How to resolve it?