1
다른 배치 크기를 사용하여 신경망을 훈련 시키려고하지만 결과 네트워크를 병합하는 방법을 모르겠습니다.matlab 신경망 훈련 배치 크기
배치 크기를 매개 변수로 사용하여 네트워크를 교육하기 위해 작성한 코드는 다음과 같습니다.
%% Train the Network using batches
batch_size = 50;
total_size = size(inputs,2);
batch_num = ceil(total_size/batch_size);
for i = 1:batch_num
start_index = i + batch_size * (i - 1);
end_index = batch_size + batch_size * (i - 1);
if i == batch_num
end_index = total_size;
end
[net,tr] = train(net,inputs(:,start_index:end_index), targets(:,start_index:end_index));
end
이
순과 TR의 구조TR =
trainFcn: 'traingdm'
trainParam: [1x1 nnetParam]
performFcn: 'mse'
performParam: [1x1 nnetParam]
derivFcn: 'defaultderiv'
divideFcn: 'dividerand'
divideMode: 'sample'
divideParam: [1x1 nnetParam]
trainInd: [1x538 double]
valInd: [1x115 double]
...
순 = 나는 결과 신경을 개최 결과 net
변수를 가져올 얼마나
Neural Network
name: 'Pattern Recognition Neural Network'
efficiency: .cacheDelayedInputs, .flattenTime,
.memoryReduction
userdata: (your custom info)
dimensions:
numInputs: 1
numLayers: 4
numOutputs: 1
numInputDelays: 0
numLayerDelays: 0
numFeedbackDelays: 0
numWeightElements: 845
sampleTime: 1
connections:
biasConnect: [1; 1; 1; 1]
inputConnect: [1; 0; 0; 0]
layerConnect: [4x4 boolean]
outputConnect: [0 0 0 1]
subobjects:
inputs: {1x1 cell array of 1 input}
layers: {4x1 cell array of 4 layers}
outputs: {1x4 cell array of 1 output}
biases: {4x1 cell array of 4 biases}
inputWeights: {4x1 cell array of 1 weight}
layerWeights: {4x4 cell array of 3 weights}
...
모든 배치가 완료된 후 그물?
흠, 그 그물 및 TR이 더 복잡 보인다 – waspinator
그것을 아무리 복잡해도 객체 유형에 관계없이 셀 배열을 만들 수 있기 때문에 아무리해도 작동해야합니다. 작동합니까? –
불행히도 없습니다. net은 1x1 네트워크입니다. 이것은 내가 얻는 오류이다 : ??? 쉼표로 구분 된 목록 확장은 이 셀이 아닌 배열에 대해 셀 구문을 사용합니다. 오류 ==> 122 [순 단부 {+ 1}, {단부 TR + 1} = 열차 (NET, 입력 (AT 분류 : START_INDEX : END_INDEX) 타겟 (: START_INDEX : END_INDEX)); – waspinator