I am doing a CNN model where my val_loss and val_accuracy keep showing constant value after so many trial and error in hyper parameter tuning. Does anyone experience this before?
It is important to check whether your val_loss is exactly the same value as before or if there is a small change. If the val_loss is a constant, the common reasons are:
Misconfiguration: Your validation set is incorrect, or you are training/validating the wrong model, etc.
Poor initial approximation or a learning rate that is too high can lead the model to an incorrect yet stable result, making it independent of many parameters/hyperparameters.
If the val_loss changes at least a little, your model may be indeed independent of your hyperparameters: In some cases, the model can learn to be insensitive to certain hyperparameters. Significantly changing the initial values of the model's intrinsic parameters can sometimes help clarify what's going on.
You can investigate the val_loss as a function of the epoch number during training. It should initially decrease and then plateau, and the values during said decrease should be different for different values of the hyperparameter. If not, there is most likely some misconfiguration. If the behavior is as described, and the plateau level is the same each time, it most likely means that your model is independent of the hyperparameters, which can sometimes be beneficial: you can set these parameters to extreme values for improved learning time.
Basically i divided my dataset into training, testing, and validation. Could you elaborate what you meant by miss configuration?
I have used various learning rate, as well as LR scheduler, the val_loss changes a little at the beginning, and remains constant afterwards. As for the val_accuracy, it stays constant.
Mohammad rohmaneo Darminto I would suggest focusing on one hyperparameter at a time while simplifying the model with extreme hyperparameter values. For example, if your hyperparameters include some basic ones (e.g., kernel sizes, number of epochs, number of layers etc), you can set them to unity. If this action does affect your val_accuracy/val_loss - voila, you have the desired dependency. If it doesn't - by similar subsequent simplifications, you may be able to make your entire model simple enough to comprehend by either general reasoning or looking into the values of the learned intrinsic parameters.
By 'misconfiguration' I meant just general errors which are common when working with complex projects: for example, if you train one model, but use different one for validation because of some sort of mix-up, etc.
'The val_loss changes a little at the beginning and remains constant afterwards.' - If val_loss changes a bit during the first epochs, and then plateaus, it sounds to me like overlearning or misrepresentation. Overlearning can be verified/rejected by comparing your train loss with val_loss. Generally, you don't want your train_loss being much smaller than val_loss.
If your validation set is misrepresentative (i.e. it contains a significant number of cases which were underrepresented in the training set), then resplitting your entire dataset in a different way may help. You can also try to have a look at the data for which the model gives a wrong prediction. If it is apparent which data group is wrongly predicted, you can also try to create a separate input batch with these cases.
Without a hands-on examination of your project, it is difficult to provide more specific advice.