Skip to content

Instantly share code, notes, and snippets.

@axling
Created January 25, 2011 07:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save axling/794611 to your computer and use it in GitHub Desktop.
Save axling/794611 to your computer and use it in GitHub Desktop.
-module(fann_example).
-export([run/0]).
run() ->
Net = fann:create_standard({2,3,1}),
fann:set_activation_function_hidden(Net, 5),
fann:set_activation_function_hidden(Net, 5),
fann:train_on_file(Net, "xor.data", 1000000, 0, 0.001),
Mse = fann:get_mse(Net),
fann:save(Net, "xor.net"),
fann:destroy(Net),
Mse.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment