Python Forum
Calculating accuracy on RNN-LSTM model - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Calculating accuracy on RNN-LSTM model (/thread-33640.html)



Calculating accuracy on RNN-LSTM model - hobbyist - May-14-2021

Hello,

How can I calculate the accuracy in a RNN-LSTM neural network?
Also when testing my model with either epoch = 1 , or epoch = 40 the result of the loss (0,01...) is approximately the same and I want to be more specific and calculate the accuracy in case there are errors with "loss" calculation.

Thanks

update: I changed this line:
model.compile(loss='mean_squared_error', optimizer='adam')
with:
model.compile(loss='mean_squared_error', optimizer='adam',metrics=['accuracy'])
and I get accuracy such as this:
...accuracy: 1.9380e-04 
or this:
...accuracy: 2.9070e-04
Update2:
Wtih this command:
model.compile(loss='mean_squared_error', optimizer='adam', metrics=[tensorflow.keras.metrics.Accuracy()])
I get this output:
...accuracy: 0.0000e+00
which does not seem good... any idea?