Python Forum

Full Version: Calculating accuracy on RNN-LSTM model
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?