1D convolution layer and Understanding Filter Size
古いコメントを表示
Hi there I am trying to understand the number of filters parameter within the 1D convolution layer. Why is it that I am not able to set the number of fiilters in this model to 20. I have one feature I am trying to use to predict a continuous variable. Xtrain is the a 1x500 double containing the data from the one feature and Ytrain is the corresponging 1x500 double of the vairavle I am trying to predict. How come I am getting an:
Number of channels in predictions (20) must match the number of channels in the targets (1).1
It works when I set the number of filters =1 but I dont understand why the number of filters cant be larger? Does the number of filters always have to equal the number of features/inputs? In this example there are 3 input features and 64 filters so I am confused: https://www.mathworks.com/help/deeplearning/ug/sequence-to-sequence-classification-using-1-d-convolutions.html
Any help would be greatly appreciated!
numFilters = 20;
filterSize = 5;
net = dlnetwork;
layers = [
sequenceInputLayer(1, Name="inputaccelerometers")
convolution1dLayer(filterSize,numFilters,Padding="causal", Name="conv1_")
];
net = addLayers(net,layers);
options = trainingOptions("adam", ...
MaxEpochs=60, ...
miniBatchSize=1, ...
InputDataFormats="CTB", ...
Metrics="rmse", ...
Verbose=0);
net = trainnet(Xtrain',Ytrain',net,"mse",options)
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Import Data についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!