Error using trainNetwork (line 184) Invalid network. Caused by: Layer 4: The size of the pooling dimension of the padded input data must be larger than or equal to the pool si
Show older comments
Hi everyone,
I want to study the performance of a given network varying the size and number of filters in convolution1dLayer and the number of windows provided as input to the trainNetwork function itself.
As you can see from the picture, I already defined (in a way that is suitable for Matlab) x_train and y_train, respectively the input and the output to my network. It should indeed receive a sequence of data from 3 sensors (in the Workspace, variable defined by n_window) and 5783 time points (in the variable length). Also, if I wish to, I could give to the network an input sequence (x_train) as a 1x1 cell (as it already is in the picture) with even greater number of windows (repeated sequences of 3*5723 matrices in x_train). This obviously implies to change the y_train as well, and the code does it well enough. For completeness, I sat the following options: solver to 'adam', maxEpochs equal to 100, SequencePaddingDirection to left and Verbose to 0.
Nevertheless, I was about to run the algorithm (just once, and that explains the break in the inner loop), to check whether it was about to work or not, but I get the following error. I don't know what is wrong, because the inputSize, parameter of the sequenceInputLayer layer, is [3 5723]. Therefore, since I sat the pooling to 2 and a stride of 2, there should be no errors, at least theoretically. I also tried to change the stride to 1, but no change in the error occurred. What am I doing wrong? Thanks in advance for your help! :)
Also, I just tried to add a MinLength parameter in sequenceInputLayer, as suggested by the error message: setting it to either 1, n_features (equal to 3) or length (equal to 5723) doesn't change the final result.

Accepted Answer
More Answers (0)
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!













