Code Monkey home page Code Monkey logo

Comments (5)

vinhkhuc avatar vinhkhuc commented on August 16, 2024

Hi siegebell,
I tried your command but couldn't reproduce the issue.

Based on the training command line, the output model file should be "model.bin.bin", not "model.bin" (fastText automatically appends the .bin suffix to the output model file).
Could you check if you loaded the correct model file?

from jfasttext.

siegebell avatar siegebell commented on August 16, 2024

@vinhkhuc the training command I gave above was in error; it should be:

ft.runCmd("supervised -input dbpedia.train -output dbpedia -minCount 5 -wordNgrams 2 -bucket 2000000 -lr, 0.05 -dim 100 -epoch 5 -thread 8".split(" "))

I've tried deleting and regenerating the normalized training data and the model, but the problem persists. Are you able to test this on OS X and JDK 1.8 and still cannot reproduce?

from jfasttext.

siegebell avatar siegebell commented on August 16, 2024

system info: macOS Sierra; version 10.12.4; 16 GB memory

from jfasttext.

vinhkhuc avatar vinhkhuc commented on August 16, 2024

@siegebell Yes, I'm using Sierra and Java 8. The following code which calls getWords() works fine for me.

import com.github.jfasttext.JFastText;
public class DebugIssue {
    public static void main(String[] args) {
        JFastText jft = new JFastText();
        jft.runCmd(("supervised " +
                "-input ../cmd/data/dbpedia.train " +
                "-output dbpedia " +
                "-minCount 5 " +
                "-wordNgrams 2 " +
                "-bucket 2000000 " +
                "-lr 0.05 " +
                "-dim 100 " +
                "-epoch 5 " +
                "-thread 8").split(" "));
        jft.loadModel("dbpedia.bin");
        System.out.println(jft.getWords());
    }
}

from jfasttext.

vinhkhuc avatar vinhkhuc commented on August 16, 2024

I got SIGSEGV if I commented out the line jft.loadModel("dbpedia.bin");. That's expected since in that case the model is not loaded, hence Exception.

from jfasttext.

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.