Giter Site home page Giter Site logo

Comments (4)

tmbdev avatar tmbdev commented on June 25, 2024

I'm adding a check for last_save being None. I think generally, if you get a floating point error during the first round, the learning rate is so wrong that restarting isn't very useful.

from dup-ocropy.

kba avatar kba commented on June 25, 2024

Was that check implemented? I cannot find it in the commit history.

from dup-ocropy.

Luonic avatar Luonic commented on June 25, 2024

Looks like i having same problem, Mac OS X El Capitan

# oops, got FloatingPointError overflow encountered in exp
Traceback (most recent call last):
  File "/usr/local/bin/ocropus-rtrain", line 286, in <module>
    pcs = network.trainSequence(line,cs,update=do_update,key=fname)
  File "/usr/local/lib/python2.7/site-packages/ocrolib/lstm.py", line 890, in trainSequence
    self.outputs = array(self.lstm.forward(xs))
  File "/usr/local/lib/python2.7/site-packages/ocrolib/lstm.py", line 605, in forward
    xs = net.forward(xs)
  File "/usr/local/lib/python2.7/site-packages/ocrolib/lstm.py", line 661, in forward
    outputs = [net.forward(xs) for net in self.nets]
  File "/usr/local/lib/python2.7/site-packages/ocrolib/lstm.py", line 640, in forward
    return self.net.forward(xs[::-1])[::-1]
  File "/usr/local/lib/python2.7/site-packages/ocrolib/lstm.py", line 559, in forward
    self.WIP,self.WFP,self.WOP)
  File "/usr/local/lib/python2.7/site-packages/ocrolib/lstm.py", line 428, in forward_py
    go[t] = ffunc(gox[t])
  File "/usr/local/lib/python2.7/site-packages/ocrolib/lstm.py", line 376, in funk
    return 1.0/(1.0+exp(-x))
FloatingPointError: overflow encountered in exp
Traceback (most recent call last):
  File "/usr/local/bin/ocropus-rtrain", line 290, in <module>
    network = load_lstm(last_save)
  File "/usr/local/bin/ocropus-rtrain", line 176, in load_lstm
    network = ocrolib.load_object(last_save)
  File "/usr/local/lib/python2.7/site-packages/ocrolib/common.py", line 503, in load_object
    fname = ocropus_find_file(name)
  File "/usr/local/lib/python2.7/site-packages/ocrolib/common.py", line 682, in ocropus_find_file
    if os.path.exists(name):
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/genericpath.py", line 26, in exists
    os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found

from dup-ocropy.

kba avatar kba commented on June 25, 2024

@Luonic Can you create a new issue, ideally with the data to reproduce the problem? This seems a fixable bug.

from dup-ocropy.

Related Issues (20)

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.