Azzera filtri
Azzera filtri

custom multi layer feed forward neural network

3 visualizzazioni (ultimi 30 giorni)
sulaiman ahmed
sulaiman ahmed il 12 Set 2015
Commentato: Greg Heath il 13 Set 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);

Risposte (0)

Tag

Non è stata ancora inserito alcun tag.

Community Treasure Hunt

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

Start Hunting!

Translated by