Borrar filtros
Borrar filtros

custom multi layer feed forward neural network

3 visualizaciones (últimos 30 días)
sulaiman ahmed
sulaiman ahmed el 12 de Sept. de 2015
Comentada: Greg Heath el 13 de Sept. de 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 comentarios
Greg Heath
Greg Heath el 13 de Sept. de 2015
Are you really trying to design a net using one input/target vector pair?

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

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

Start Hunting!

Translated by