Image regression with missing target values

I want to train a network to predict the location of a list of features. However, not every feature is labeled in every single image, although they’re present in most of them.
What is the best practice in such a case? I suppose the best way is to train the network in all features at once, i.e. hava as many output units as features, but not update the gradient for a given output unit if an example happens to miss the corresponding label.
Is that correct? Is there a simple way to do that in

1 Like

Just for the record, I ended up simply coding missing values as -1 and it seems to be working all right. Sometimes the simplest solution is the best one