def create_from_file(filename): """ Constructs a backpropagation neural network from a configuration file. """ ann = libfann.fann_create_from_file(filename) if libfann.fann_is_NULL(ann): raise IOError, "Could not load ann from file '%s'" + filename return fann_class(ann)
def create_from_file(filename): """ Constructs a backpropagation neural network from a configuration file. """ ann = libfann.fann_create_from_file(filename) return fann_class(ann)