Skip to content

Instantly share code, notes, and snippets.

@rougeth
Created May 7, 2013 18:52
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 rougeth/5535109 to your computer and use it in GitHub Desktop.
Save rougeth/5535109 to your computer and use it in GitHub Desktop.
% Exercício 1
%
% Entrada: Saída esperada:
% Bach 00 1
% Beethoven 01 1
% Einstein 10 0
% Kepler 11 0
%
% Entradas
P = [0 0 1 1; 0 1 0 1];
% Saída
T = [1 1 0 0];
net = newp([0 1; 0 1],1);
weight_init = net.IW{1,1};
bias_init = net.b{1};
net.trainParam.epochs = 20;
net = train(net,P,T);
weight_final = net.IW{1,1};
bias_final = net.b{1};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment