2

I'm running an LSTM model to classify astrophysics time series data. I am attempting to classify each time series as either a black hole (1) or not a block hole (0). When I run my RNN, the loss is not decreasing (actually increasing then going to NaN). I cannot figure out how solve this problem. Here is the link to my Jupyter Notebook (which contains more information on the problem).

https://colab.research.google.com/drive/1NJBEIdoeToqdcYooGEtrVfaELtLXwNjZ?usp=sharing#scrollTo=d_HDprISPjZT

Let me know if you know how to solve this problem.

1 Answers1

0

It's probably ReLU; try activation="tanh".

Here's additional text for no reason because stack overflow thinks one can never answer a question this briefly.

OverLordGoldDragon
  • 1
  • 9
  • 53
  • 101
  • I switched all the ReLUs to tanh and now the gradient is no longer exploding, but it's not decreasing. It's simply staying stable. Any suggestion on how to fix that? –  May 02 '21 at 04:01
  • @user23472342 That's a separate question, feel free to open it. – OverLordGoldDragon May 02 '21 at 04:02
  • I'm aware but do you have any suggestions? –  May 02 '21 at 04:04
  • @user23472342 Try asking on [Stats](https://stats.stackexchange.com/) or [DS](https://datascience.stackexchange.com/), and provide relevant information about the problem _in your question_. – OverLordGoldDragon May 02 '21 at 04:31