Validation loss higher than training loss from first epoch

Hi all,

From what I’ve learned when the validation loss > training loss there is overfitting. However I’m getting this from the first epoch. See below:

I’m trying to predict if a person is sitting, lying on the floor, standing, lying in bed or sitting in bed with a tabular learner that takes pose coordinates as inputs (x, y, confidence mixed with some room semantic).

I have 360K annotated poses, of which the majority is sitting, then standing, etc… We got about 20K lying on floor poses. I upsample all training data so all categories are equally represented. The validation set is 2% of the training set. I tried lowering the number of layers. This brings the training loss a bit closer to the validation loss, but the validation loss always is high than the training loss, from the first epoch on. Anyone have any explanation for this?

1 Like

Hi rept hope all is well!

May be the following suggestions can be of help.

  1. Create a baseline model of classes with an equal number images in each class (no upsampling).
  2. Make the validation set 20% of the above data.
  3. Make a test set which is 10% of the above data.
  4. Make sure the classes have clean data in them e.g. no lying in the sitting class.
  5. Your baseline model could have 200-1000 items in each class as this is a test model.

If you train this model and it works fine, then this should help pinpoint any problems or errors that are occurring elsewhere.

Hope this helps.

Cheers mrfabulous1 :grinning: :grinning:

2 Likes

Hi @rept and welcome!

It’s not correct that validation loss > training loss always means overfitting. You never want to have a model where training loss is > validation loss, that would mean you didn’t train enough and are underfitting. (See lesson 2 of last year’s course, starting from 49:00 to 53:00)

As long as your accuracy doesn’t get worse, you’re not overfitting :slight_smile:

3 Likes

Thanks for the answers!