Closed Mr-Elysium closed 3 years ago
System information
OS: Ubuntu 18
TensorFlow version: 2.1.0
Keras version: 2.3.1
Python version: 3.6.9
Same issue when I try to predict (model.predict) any trained model. The training seems unaffected.
This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Thank you.
Closing as stale. Please reopen if you'd like to work on this further.
System information
Current Behaviour I am trying to predict if a stock price is going to go up or down the next day. I am using a pandas DataFrame that has 43 columns of which one is the y value, the y values are floats between 0 and 1, also my DataFrame has 5016 rows indexed with numbers. I made a model with some LSTM cells some Dense cells with the loss function being biary_crossentropy, but when I run the model and try to print the predictions all of the predictions are the same:
[[0.56393844]
[0.56393844]
[0.56393844]
...
[0.56393844]
[0.56393844]
[0.56393844]]
The y values are not all the same. Y values:
0
1
0
1
1
The loss and accuracy also start being the same:
Epoch 7/10
4012/4012 [==============================] - 20s 5ms/sample - loss: 0.7052 - acc: 0.5015 - val_loss:
0.6884 - val_acc: 0.5488
Epoch 8/10
4012/4012 [==============================] - 19s 5ms/sample - loss: 0.7054 - acc: 0.4980 - val_loss:
0.6907 - val_acc: 0.5488
Epoch 9/10
4012/4012 [==============================] - 18s 5ms/sample - loss: 0.7078 - acc: 0.4890 - val_loss:
0.6894 - val_acc: 0.5488
Expected Behaviour I want so that my program actually learns from the data and predict it somehwat correctly opposed to predicting the same values over and over again. don't know much about neural networks, so I don't know which layers are the most effective or how many layers I should make. If somebody knows how I can fix this so my neural network actually learns, please let me know. I you know how to make my network more efficient or better also let me know. Thanks in advance.
Code to reproduce the issue
Other info / logs