I am attempting to train an ANN using NetTrain and see errors that I may be related to the size of the training inputs. The training data consists of 245 rows of 1004 input data elements and 245 rows of 2 output elements. When I use a smaller training data set (23 by 1004 inputs and 23 by 2 outputs) NetTrain runs without problems. However, when I use the full training set [245 by 1004 inputs and 245 by 2 outputs) I receive an error. The input data files do not appear to be corrupted in any way. Is there an obvious problem with this procedure? Any help is appreciated. Clark
In[19]:= testinputs = Import["SimpleLivingScanData2IN.csv"]
In[20]:= testoutputs = Import["SimpleLivingScanData2OUT.csv"];
In[27]:= Dimensions[testinputs]
Out[27]= {245, 1004}
In[38]:= Dimensions[testoutputs]
Out[38]= {245, 2}
In[30]:= trainingcnet =
Flatten@Table[testinputs[[i, All]] -> testoutputs[[i, All]], {i, 1, 23}];
In[31]:= trainingcnet[[23, All]];
In[32]:= Dimensions[trainingcnet]
Out[32]= {23}
In[36]:= cnet = NetInitialize[
NetChain[{LinearLayer[20], LinearLayer[20], 2}, "Input" -> 1004]]
In[64]:= trainedcnet[testinputs[[20, All]]]
testoutputs[[20, All]]
Out[64]= {0.100103, 13.9911}
Out[65]= {0.1, 14.1421}
Now experiment with BatchSize
In[66]:= trainingcnet2 =
Flatten@Table[testinputs[[i, All]] -> testoutputs[[i, All]], {i, 1, 245}];
In[39]:= cnet2 = NetInitialize[
NetChain[{LinearLayer[20], LinearLayer[20], 2}, "Input" -> 1004]]
In[41]:= trainedcnet2 =
NetTrain[cnet2, trainingcnet2, BatchSize -> 20, MaxTrainingRounds -> 100000,
TrainingProgressReporting -> "Print"]
During evaluation of In[41]:= NetTrain::invtdata: Training data should be an association of lists, or a rule from input to output examples.
Out[41]= $Failed