How do I use datastores for sequence to sequence classification using the Deep Learning Toolbox?
1 次查看(过去 30 天)
显示 更早的评论
I'm using the Deep Learning Toolbox to classify input signals, in a similar fashion to that shown in this example. However instead of 3 features, my data has 152, and instead of 6 observations, my data has 767. This amount of data is too large to feed directly into network training function, and I believe datastores are the solution for this. However I am having trouble working out the correct format for the data output of the datastore read function.
The MATLAB examples for read data do not seem suited to sequence-to-sequence classification. This example shows general sequence classification, but requires padding of sequences with zeros, resulting in uniform sized sequences, which doesn't seem appropriate for sequence to sequence classification.
I have tried modifying the datastore in the previous example such that its read function outputs a cell of size {batchLength,2} with the first column containing doubles in the format {numFeatures,sequenceLength} and the second column containing categoricals in the format {1,sequenceLength}. Separating this output into its consituent columns and feeding them directly into the trainNetwork function works perfectly. However, in the datastore format I get an error:
% Error using trainNetwork (line 170)
% Unexpected response size: If the network outputs sequences, then the responses must be arrays with
% feature dimension 9.
Where 9 is the number of classes.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Deep Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!