7

In the Python implementation of FANN, I got this error from

from pyfann import libfann
ann = libfann.neural_net()
ann.create_standard(4, 2, 8, 9, 1)
#FANN Error 11: Unable to allocate memory.

Any suggestion?

Community
  • 1
  • 1
d.putto
  • 7,185
  • 11
  • 39
  • 45

1 Answers1

6

There is a bug in create_standard and the other simple creates. The workaround is

ann.create_standard_array([2,8,9,1])

same for create_sparse and create_shortcut.

Davoud Taghawi-Nejad
  • 16,142
  • 12
  • 62
  • 82
  • 2
    This is not specific to Python. This happens in the core C library, and is fixed by this answer. – gak Sep 21 '14 at 18:19