Error Using Prediction With LSTM
Mostrar comentarios más antiguos
Hi Everyone!
I trained an LSTM with Keras and I'm importing this network with a .h5 file and it has the next characteristics:

Dimensions for inputs in this network with keras are a 3D matrix composed by (number of samples, time steps, number features per time step), I'm trying the same dimension in MATLAB but I get this error:
Undefined function 'predict' for input arguments of type 'nnet.cnn.layer.Layer'.
This is the code that I'm using for predict:
modelfile = 'Modelos\ControlLSTM_XYZ_1.h5';
net = importKerasLayers(modelfile)
save('Modelos\netLSTM.mat','net')
Example=randi([0 10],5,4,24)/10;
predict(net,Example)
In this case 'Example' is a matrix of inputs with random values between 1 and 0, that I'd use for generate a prediction with my neural network, I'd like to know if this format for inputs change in MATLAB or if it still the same, due to it's a network from Keras, also I'd like to know if in my code I'm doing some mistake with LSTM networks because I don't understanf why MATLAB show an error related with convolutional neural networks?.
Thanks for your help.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Get Started with 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!