sabersabersaber / transformer_ocr Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
我在训练Mj ST两个数据集时,遇到了RuntimeError: expected device cuda:1 but got device cuda:0报错请问该如何修改呢?Original Traceback (most recent call last):
File "/home/will/anaconda3/envs/transocr/lib/python3.6/site-packages/torch/nn/parallel/parallel_apply.py", line 60, in _worker
output = module(*input, **kwargs)
File "/home/will/anaconda3/envs/transocr/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "/home/will/transformer/codes/transformer_OCR-main/model.py", line 129, in forward
prediction = self.Prediction(contextual_feature.contiguous(), text, is_train)
File "/home/will/anaconda3/envs/transocr/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "/home/will/transformer/codes/transformer_OCR-main/modules/transformer_util.py", line 376, in forward
enc_src = self.encoder(src, src_mask)
File "/home/will/anaconda3/envs/transocr/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "/home/will/transformer/codes/transformer_OCR-main/modules/transformer_util.py", line 49, in forward
src = self.dropout(((src) * self.scale) + self.pos_embedding(pos))
RuntimeError: expected device cuda:1 but got device cuda:0
请问作者有和论文的结果比较吗?
你好!
感谢你的开源代码。我跑了你的开源代码,但是平均准确率好像达不到你说的85%,请问你在训练过程中加了什么trick吗?
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.