How to transfer a 1D-CNN from Tensorflow?
Mostrar comentarios más antiguos
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?
Respuesta aceptada
Más respuestas (1)
David Willingham
el 6 de Jun. de 2022
0 votos
Hi, are you trying to create the network from scratch? Or does the paper have a link to the TensorFlow code on GitHub?
1 comentario
Daniel Papp
el 6 de Jun. de 2022
Categorías
Más información sobre Deep Learning Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!