필터 지우기
필터 지우기

custom multi layer feed forward neural network

조회 수: 3 (최근 30일)
sulaiman ahmed
sulaiman ahmed 2015년 9월 12일
댓글: Greg Heath 2015년 9월 13일
_ _ *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
Greg Heath
Greg Heath 2015년 9월 13일
Are you really trying to design a net using one input/target vector pair?

댓글을 달려면 로그인하십시오.

답변 (0개)

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by