|
#!/usr/bin/python
import fann
connection_rate = 1
learning_rate = 0.7
num_input = 2
num_neurons_hidden = 4
num_output = 1
desired_error = 0.0001
max_iterations = 100000
iterations_between_reports = 1000
ann = fann.create(connection_rate, learning_rate, (num_input, num_neurons_hidden, num_output))
ann.train_on_file("datasets/xor.data", max_iterations, iterations_between_reports, desired_error)
ann.save("xor_float.net")
ann.destroy()
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.