Hi, I face the problem when trainning my feedforwardnet nn_h with multiple inputs X_h as a cell format and single target Y_h. I do not know why inputs partially disconnect with hidden layer after I train my network, as shown by the resulted figure
my simple code is as follows.
clear;inputnum=3;batch_size=10;X_h=cell(inputnum,1);for i=1:inputnum X_h{i,1}=zeros(1,batch_size); for j=1:batch_size X_h{i,1}(:,j)=i; endendY_h=cell(1,1);Y_h{1,1}=zeros(1,batch_size);for j=1:batch_size Y_h{1,1}(:,j)=4;endnn_h=feedforwardnet(10);nn_h.numInputs = inputnum;for k=1:inputnum nn_h.inputConnect(1,k)=1; % even I set connections for each input with hidden layer, it seems partially removed after 'train' as above figure shows
endnn_h=train(nn_h,X_h,Y_h);
Best Answer