Answer the question
In order to leave comments, you need to log in
How to connect a library from github to a project in Intellij Idea?
Hello!
You need to link the library to the Intellij Idea project.
Libraries from ready-made jar files are connected normally, but this one does not work.
I connect according to the instructions:
import com.googlecode.fannj.*;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
public class Solution {
public static void main(String[] args) {
//Для сборки новой ИНС необходимо создасть список слоев
List<Layer> layerList = new ArrayList<Layer>();
layerList.add(Layer.create(3, ActivationFunction.FANN_SIGMOID_SYMMETRIC, 0.01f));
layerList.add(Layer.create(16, ActivationFunction.FANN_SIGMOID_SYMMETRIC, 0.01f));
layerList.add(Layer.create(4, ActivationFunction.FANN_SIGMOID_SYMMETRIC, 0.01f));
Fann fann = new Fann(layerList);
//Создаем тренера и определяем алгоритм обучения
Trainer trainer = new Trainer(fann);
trainer.setTrainingAlgorithm(TrainingAlgorithm.FANN_TRAIN_RPROP);
/* Проведем обучение взяв уроки из файла, с максимальным колличеством
циклов 100000, показывая отчет каждую 100ю итерацию и добиваемся
ошибки меньше 0.0001 */
trainer.train(new File("assets/lesson.txt").getAbsolutePath(), 100000, 100, 0.0001f);
fann.save("ann");
}
}
java.lang.UnsatisfiedLinkError: Unable to load library 'fann': Native library
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question