Filter löschen
Filter löschen

custom multi layer feed forward neural network

3 Ansichten (letzte 30 Tage)
sulaiman ahmed
sulaiman ahmed am 12 Sep. 2015
Kommentiert: Greg Heath am 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 Kommentare
Greg Heath
Greg Heath am 13 Sep. 2015
Are you really trying to design a net using one input/target vector pair?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Tags

Noch keine Tags eingegeben.

Community Treasure Hunt

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

Start Hunting!

Translated by