简体   繁体   中英

What is the filepath that FANNJ (FANN in Java) constructor is expecting?

I am new to working with java. I wanted to know the requisites and the procedure to use the FANN-1.1 tool library in java to train a set of data.

The code given in https://code.google.com/p/fannj/ is

 Fann fann = new Fann( "/path/to/file" );
    float[] inputs = new float[]{ -1, 1 };
    float[] outputs = fann.run( inputs );
    fann.close();

here what is /path/to/file

According to fann source codes it seems to be a pointer to a configuration file. You probably should use "fann_set_user_data" in your existing ANN in C. It would create a file retrievable by "fann_get_user_data" function and also would be what fannj example is expecting. Fannj implementation has many other function interfaces, so, it is only an example.

Sources: http://leenissen.dk/fann/html/files/fann-h.html#fann_set_user_data https://github.com/krenfro/fannj/blob/master/src/main/java/com/googlecode/fannj/Fann.java

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM