Effacer les filtres
Effacer les filtres

custom multi layer feed forward neural network

3 vues (au cours des 30 derniers jours)
sulaiman ahmed
sulaiman ahmed le 12 Sep 2015
Commenté : Greg Heath le 13 Sep 2015
_ _ *I have custom multi layer feed forward program , but the validation and test performance equal to NaN value (ther is no curve , but only training performance ), i want simple code of using custom network for any type of inputs and outputs but i want introduce the validation and test performance value , I would be grateful if anyone can help me , the code is as follows :
close all, clear all, clc, format compact
inputs = [1:6]' % input vector (6-dimensional pattern)
outputs = [1 2]' % corresponding target output vector
% create network
net = network( ...
1, ... % numInputs, number of inputs,
2, ... % numLayers, number of layers
[1; 0], ... % biasConnect, numLayers-by-1 Boolean vector,
[1; 0], ... % inputConnect, numLayers-by-numInputs Boolean matrix,
[0 0; 1 0], ... % layerConnect, numLayers-by-numLayers Boolean matrix
[0 1] ... % outputConnect, 1-by-numLayers Boolean vector
);
net.layers{1}.size = 5;
% hidden layer transfer function
net.layers{1}.transferFcn = 'radbas';
view(net);
net = configure(net,inputs,outputs);
view(net);
% initial network response without training
initial_output = net(inputs)
% network training
net.trainFcn = 'trainlm';
net.performFcn = 'mse';
[net,tr] = train(net,inputs,outputs);
% network response after training final_output = net(inputs)
plotperf(tr);
  2 commentaires
Greg Heath
Greg Heath le 13 Sep 2015
Are you really trying to design a net using one input/target vector pair?

Connectez-vous pour commenter.

Réponses (0)

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by