Hot answers tagged

2 votes
Accepted

Why can't I reproduce my results in keras using random seed?

Are you using a CPU or a GPU? If you are using a GPU, there is an additional source of randomness. To confirm this point, you can try to use TensorFlow with CPU only, or disable Cuda DNN but the model ...
user avatar
2 votes

Weather impact on plant growth

It's difficult to guess which option is going to give the best results, since it depends on many factors in the data. This is feature engineering, and while there are some general principles it's not ...
user avatar
  • 21.8k
2 votes

How to stop deep learning speech model to not recognize stranger voice?

98% is too high: Your model might overfit actually. Did you apply a drop out of 0.1 or 0.2? On the other hand, is your model trained on stranger voices? Otherwise, if there is no existing training for ...
user avatar
2 votes

When should one use L1, L2 regularization instead of dropout layer, given that both serve same purpose of reducing overfitting?

It seems deciding between L2 and Dropout is a "guess and check" type of thing, unfortunately. Both are used to make the network more "robust" and reduce overfitting by preventing ...
user avatar
1 vote
Accepted

Reproduce Keras training results in Jupyter Notebook

Did you set the same random seed at each step? The seed works well for the first function, but then it is lost in the next ones because NumPy applies a global seed reset automatically. For example, ...
user avatar
1 vote
Accepted

Keras model.predict get the value for the predicion

I don't understand why you would need to expand the dimensions of X_train_normal during .fit(). Remove that part to simply fit ...
user avatar
1 vote

How to further improve on overfitting?

This was an issue I was struggling with for over a week but the eventual problem seemed to be perhaps something in the way the function was done; Initially I used ...
user avatar
  • 111
1 vote
Accepted

Loss function to prevent estimator bias

Thank you @Nikos M. for your suggestions. I was about to use your post-applied factor but then gave it another try. And found what caused this. It was that the final layer was using a ...
user avatar
1 vote

AttributeError: module 'tensorflow.python.keras.utils' has no attribute 'to_categorical'

As of tensorflow version 2.9.2, the correct import is: from tensorflow.python.keras.utils.np_utils import to_categorical
user avatar
1 vote
Accepted

Having weird accuracy graph on deep learning binary classification model

Assuming that the dataset is balanced, my intuition is the following: From epoch 1 to 55: the loss function being superhigh indicates your model is doing random predictions but with probabilities near ...
user avatar
  • 489
1 vote

Interpreting a curve val_loss and loss in keras after training a model ; help

The training loss decreases while the validation loss increases, which is a clear sign of overfitting. This means that your model is too specific to the training dataset and do not generalize to the ...
user avatar
  • 489
1 vote
Accepted

Found 0 images belonging to 0 classes

Tensorflow expects sub-directories for every single class that you have inside the primary directory. For example: inside /Object-samples/ you'd have two sub-...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible