luopeixiang / im2latex Goto Github PK
View Code? Open in Web Editor NEWPytorch implemention of Deep CNN Encoder + LSTM Decoder with Attention for Image to Latex
License: MIT License
Pytorch implemention of Deep CNN Encoder + LSTM Decoder with Attention for Image to Latex
License: MIT License
我记得有个专门针对100K做数据增强的网站,还有人记得么?
torch==1.3.1
在训练的时候,显卡内存一直上涨,大概训练几十轮后,最终内存溢出。
after i trained the model ,the loss is very low ,but when i evaluate on the train and test dataset all the scores are very very low and the predict is very bad ,why?I haven't change any code.
你好,能提供预训练模型和evaluate.py文件吗
Hey all,
i was just training the model and i am struck after training that where should I input the picture to get the decoded output.
Thanks in advance
想验证一下效果,evalute的时候是不是只要输入一个公式图片就可以,但是网络forward的时候还要求latex。。。这个不知道应该怎么处理了
训练第一个epoch的时候碰到了这个错误
RuntimeError: CUDA out of memory. Tried to allocate 60.00 MiB (GPU 0; 10.76 GiB total capacity; 9.62 GiB already allocated; 31.12 MiB free; 308.09 MiB cached)
Hello,
when calling preprocess.py, it always exits with "-9".
This is due to the "pairs" list in line 21 stores all the 100k formulas with corresponding img.
Did somebody got this working so far ?
Using macOS Monterey (12.3.1) on Apple M1.
Thanks!
hi,
Thanks to Pytroch Version.
Where could I get the datasets?
随便跑了一般发现不同的测试的结果飘忽不定但总体都比readme中的高,readme中的结果有参考价值吗?作者跑了多少epoch?
你好,采用https://github.com/guillaumegenthial/im2latex 模型训练的模型,可以用这个pytorch代码读取么
im2latex/model/position_embedding.py
Line 43 in cd80800
I found your code little bit strange. I think this code should have been changed like below.
sinusoid[:,::2] = torch.sin(scaled_time)
sinusoid[:,1::2] = torch.cos(scaled_time)
Do I misunderstand your code?
运行evaluate.py时,遇到如下报错,请问博主,这个该如何解决呀?
raise ZeroDivisionError('Fraction(%s, 0)' % numerator)
ZeroDivisionError: Fraction(0, 0)
Hi
I was able to train the model.
When I try to evaluate the model using the command, I get this following error. How do I overcome this ?
(pytG) Power-Ubuntu-18-9:~/im2latex-master$ python evaluate.py --split=test --model_path=/home/im2latex-master/save/best_ckpt.pt --data_path=/home/im2latex-master/data --batch_size=8
Load vocab including 394 words!
0%| | 0/1295 [00:00<?, ?it/s]/home/anaconda3/envs/pytG/lib/python3.8/site-packages/torch/nn/functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at /opt/conda/conda-bld/pytorch_1623448278899/work/c10/core/TensorImpl.h:1156.)
return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode)
0%| | 0/1295 [00:01<?, ?it/s]
Loaded 0 formulas from ./results/result.txt
Loaded 0 formulas from ./results/ref.txt
Traceback (most recent call last):
File "evaluate.py", line 89, in
main()
File "evaluate.py", line 84, in main
score = score_files(args.result_path, args.ref_path)
File "/home/im2latex-master/model/score.py", line 31, in score_files
"BLEU-4": bleu_score(refs, hyps)*100,
File "/home/im2latex-master/model/score.py", line 68, in bleu_score
BLEU_4 = nltk.translate.bleu_score.corpus_bleu(
File "/home/anaconda3/envs/pytG/lib/python3.8/site-packages/nltk/translate/bleu_score.py", line 205, in corpus_bleu
p_n = [
File "/home/anaconda3/envs/pytG/lib/python3.8/site-packages/nltk/translate/bleu_score.py", line 206, in
Fraction(p_numerators[i], p_denominators[i], _normalize=False)
File "/home/anaconda3/envs/pytG/lib/python3.8/fractions.py", line 178, in new
raise ZeroDivisionError('Fraction(%s, 0)' % numerator)
ZeroDivisionError: Fraction(0, 0)
I haven't changed anything on the repo copied. Training is successful, but this error shows in evaluating ( by default on test data).
Thanks in advance.
Shravan
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.