0

I found in the Fast Artificial Neural Network documentation that the seed function is fann_seed_rand() but I don't understand how it works. Calling it or not seems to do the same.

How can I fix the seed? The main goal is for fann_shuffle_data() to do the same shuffling every time and test different ANN configurations.

Thanks in advance,

VictorGalisson
  • 635
  • 9
  • 27
  • 1
    Looking at the source, it's like it's using `srand` but you must enable it first with `fann_enable_seed_rand();` – Jongware Mar 18 '18 at 14:22
  • `fann_seed_rand` is an internal function which is called by `fann_create_array` and `fann_create_shortcut_array`. I don't think it matters if you call it or not. What version of FANN are you using? – Bob Jarvis - Слава Україні Mar 18 '18 at 14:24
  • @BobJarvis I'm using the 2.2.0 version, I've read that it's possible in the latests versions of FANN but I can't find how. – VictorGalisson Mar 18 '18 at 14:35
  • @usr2564301 `fann_enable_seed_rand()` gives me an undefined reference, where did you find it? – VictorGalisson Mar 18 '18 at 14:42
  • 1
    Uh– with Google? It pointed me towards https://libfann.github.io/fann/docs/files/fann-h.html and the source file, where I could confirm it should work as documented. – Jongware Mar 18 '18 at 14:45
  • @usr2564301 oh, true i didn't see that while exploring the website, looks like it's available in FANN 2.3.0, thanks! – VictorGalisson Mar 18 '18 at 15:07

1 Answers1

0

fann_enable_seed_rand() is the function I was looking for, like @usr2564301 answered.

It's available with the >= 2.3.0 FANN library

VictorGalisson
  • 635
  • 9
  • 27