Git Product home page Git Product logo

transformer_ocr's People

Contributors

sabersabersaber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

transformer_ocr's Issues

RuntimeError: expected device cuda:1 but got device cuda: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吗?

dataset

assert len(datasets) > 0, 'datasets should not be an empty iterable'  # type: ignore

AssertionError: datasets should not be an empty iterable

数据格式是
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.