Training accuracy is ~97% but validation accuracy is stuck at ~40%.
I can not understand the meaning of two concepts and their relationship.
Data Science Stack Exchange is a question and answer site for Data science professionals, Machine Learning specialists, and those interested in learning more about the field. It only takes a minute to sign up.Sign up to join this community
A little more context about the data set and type of model would help, but most likely your model is overfitting to the training data. This means that your model is picking up noise from the training data and has basically "memorized" the data it has seen.
Therefore, the model is not generalizable, and this results in relatively poor performance on a data set it hasn't seen, explaining the 40% validation accuracy.