segunda-feira, 3 de outubro de 2016

Fast Artificial Neural Network Library (FANN)

http://www.wildml.com/2016/04/deep-learning-for-chatbots-part-1-introduction/
https://github.com/libfann/fann

FANN

Fast Artificial Neural Network (FANN) Library is a free open source neural network library, which implements multilayer artificial neural networks in C with support for both fully connected and sparsely connected networks.
Cross-platform execution in both fixed and floating point are supported. It includes a framework for easy handling of training data sets. It is easy to use, versatile, well documented, and fast.
Bindings to more than 15 programming languages are available.
An easy to read introduction article and a reference manual accompanies the library with examples and recommendations on how to use the library.
Several graphical user interfaces are also available for the library.


refer: https://github.com/libfann/fann 03/10/2016


To Learn More

To get started with FANN, go to the FANN help site, which will include links to all the available resources.
For more information about FANN, please refer to the FANN website

                                                             Test.C

#include
#include "floatfann.h"

int main()
{
    fann_type *calc_out;
    fann_type input[2];

    struct fann *ann = fann_create_from_file("xor_float.net");

    input[0] = -1;
    input[1] = 1;
    calc_out = fann_run(ann, input);

    printf("xor test (%f,%f) -> %f\n", input[0], input[1], calc_out[0]);

    fann_destroy(ann);
    return 0;
}

                                                       Trainning.C



#include "fann.h"

int main(void)
{
    const unsigned int num_input = 2;
    const unsigned int num_output = 1;
    const unsigned int num_layers = 3;
    const unsigned int num_neurons_hidden = 3;
    const float desired_error = (const float) 0.001;
    const unsigned int max_epochs = 500000;
    const unsigned int epochs_between_reports = 1000;

    struct fann *ann = fann_create_standard(num_layers, num_input,
        num_neurons_hidden, num_output);

    fann_set_activation_function_hidden(ann, FANN_SIGMOID_SYMMETRIC);
    fann_set_activation_function_output(ann, FANN_SIGMOID_SYMMETRIC);

    fann_train_on_file(ann, "treino.data", max_epochs,
        epochs_between_reports, desired_error);

    fann_save(ann, "xor_float.net");

    fann_destroy(ann);

    return 0;
}
 


                                                        xor_float.net

FANN_FLO_2.1
num_layers=3
learning_rate=0.700000
connection_rate=1.000000
network_type=0
learning_momentum=0.000000
training_algorithm=2
train_error_function=1
train_stop_function=0
cascade_output_change_fraction=0.010000
quickprop_decay=-0.000100
quickprop_mu=1.750000
rprop_increase_factor=1.200000
rprop_decrease_factor=0.500000
rprop_delta_min=0.000000
rprop_delta_max=50.000000
rprop_delta_zero=0.100000
cascade_output_stagnation_epochs=12
cascade_candidate_change_fraction=0.010000
cascade_candidate_stagnation_epochs=12
cascade_max_out_epochs=150
cascade_max_cand_epochs=150
cascade_num_candidate_groups=2
bit_fail_limit=3.49999994039535522461e-01
cascade_candidate_limit=1.00000000000000000000e+03
cascade_weight_multiplier=4.00000005960464477539e-01
cascade_activation_functions_count=10
cascade_activation_functions=3 5 7 8 10 11 14 15 16 17
cascade_activation_steepnesses_count=4
cascade_activation_steepnesses=2.50000000000000000000e-01 5.00000000000000000000e-01 7.50000000000000000000e-01 1.00000000000000000000e+00
layer_sizes=3 4 2
scale_included=0
neurons (num_inputs, activation_function, activation_steepness)=(0, 0, 0.00000000000000000000e+00) (0, 0, 0.00000000000000000000e+00) (0, 0, 0.00000000000000000000e+00) (3, 5, 5.00000000000000000000e-01) (3, 5, 5.00000000000000000000e-01) (3, 5, 5.00000000000000000000e-01) (0, 5, 0.00000000000000000000e+00) (4, 5, 5.00000000000000000000e-01) (0, 5, 0.00000000000000000000e+00)
connections (connected_to_neuron, weight)=(0, 7.21123456954956054688e+00) (1, 7.21535873413085937500e+00) (2, -2.58914256095886230469e+00) (0, -7.93075382709503173828e-01) (1, -6.85643434524536132812e-01) (2, 6.02467298507690429688e-01) (0, -3.46010148525238037109e-01) (1, -6.52400553226470947266e-01) (2, -1.21421933174133300781e-01) (3, 3.55848765373229980469e+00) (4, 8.45527553558349609375e+00) (5, 1.31663990020751953125e+00) (6, 6.74867451190948486328e-01)


                                             Treino.dat

4 2 1
0 0
0
1 0
1
0 1
1
1 1
0
 

                                           

https://developer.microsoft.com/en-us/skype/bots/docs
 http://paginapessoal.utfpr.edu.br/wcoliveira/apresentacao/palestraVizivali.pdf
https://dev.botframework.com/ 

 JADE  1998 - 2016
Mecher rosto + Rodrigo Faro(Vidro) + OpenCV + Chat BOT = JADE
https://www.youtube.com/watch?v=dauuitgPM4w
opencv.org/
http://www.wildml.com/2016/04/deep-learning-for-chatbots-part-1-introduction/
http://www.graphics.stanford.edu/~niessner/niessner2013hashing.html
https://developer.microsoft.com/en-us/skype/bots/docs
http://www.graphics.stanford.edu/~niessner/papers/2013/1thesis/niessner2013thesis.pdf
http://www.graphics.stanford.edu/~niessner/
https://www.youtube.com/watch?v=ohmajJTcpNk
 
Postar um comentário