简体   繁体   English

FANNJ(Java中的FANN)构造函数期望的文件路径是什么?

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

I am new to working with java. 我是使用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. 我想知道在Java中使用FANN-1.1工具库训练一组数据的必要条件和过程。

The code given in https://code.google.com/p/fannj/ is https://code.google.com/p/fannj/中给出的代码是

 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 这是什么/ path / to / file

According to fann source codes it seems to be a pointer to a configuration file. 根据fann源代码,它似乎是指向配置文件的指针。 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. 您可能应该在C中现有的ANN中使用“ fann_set_user_data”。它将创建一个可通过“ fann_get_user_data”函数检索的文件,并且也正是fannj示例所期望的。 Fannj implementation has many other function interfaces, so, it is only an example. Fannj实现还有许多其他功能接口,因此,这只是一个例子。

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 来源: 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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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