How to transfer a 1D-CNN from Tensorflow?
Ältere Kommentare anzeigen
I'm trying to recreate the CNN to MATLAB from this paper: https://doi.org/10.1021/acs.analchem.8b05821. In the code uploaded to GitHub, the authors use a series on Conv1D layers which is equivalent to MATLAB's convolution1dLayer. Their inputs are 250x36 onehot encoded matrices. The network slides convolutional filters along the longer dimension of this matrix to extract features and use them for regression purposes.
However, when I try to feed the network similar matrices, I receive an "Input data must have one spatial dimension only" error message at the first convolution layer. Am I supposed to flatten the input matrix first before the convolutional layer? I didn't find any evidence for such an operation in the code. Or is there any workaround to this using a 2D convolution layer?
Akzeptierte Antwort
Weitere Antworten (1)
David Willingham
am 6 Jun. 2022
0 Stimmen
Hi, are you trying to create the network from scratch? Or does the paper have a link to the TensorFlow code on GitHub?
1 Kommentar
Daniel Papp
am 6 Jun. 2022
Kategorien
Mehr zu Deep Learning Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!