Giter VIP home page Giter VIP logo

fmdl's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

wqfengnlpr

fmdl's Issues

Segmentation only by letters

Hello there,

I've tested the code to segment protein aminoacid sequences (it's similar to chinese language rules).

When I run the code, it gave letter by letter segmentation of the sequences,

Is the code still under development, or is there any limitations regarding input sequences,

Appreciate any help, thanks !

"ValueError: math domain error" when training on a large file

I have a large training file with 1252976 lines. When I use it to train a model(vocab_size: 30000), it raised an error like following:

Building pair statistics: 2116233it [00:03, 614115.37it/s]
Commit to codebook:   8% 688/8761 [00:00<00:10, 753.77it/s]
Traceback (most recent call last):
  File "learn_mdl.py", line 202, in <module>
    main(args)
  File "learn_mdl.py", line 161, in main
    codebook = trainer(args.iterations, args.verbose)
  File "learn_mdl.py", line 150, in train
    if not self.update_codebook(candidates):
  File "learn_mdl.py", line 129, in update_codebook
    if self.commit_and_success(pair, total, cost):
  File "learn_mdl.py", line 106, in commit_and_success
    if sum(self.compute_cost(w1, w2, total)) > 0:
  File "learn_mdl.py", line 63, in compute_cost
    float(total), float(c1), float(c2), self.data_len)
  File "learn_mdl.py", line 68, in compute_data_cost
    data_cost += c1 * math.log(c1 / n)
ValueError: math domain error

How can I fix it? Thanks in advance

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.