Do I need to rescale input labels before training (label values between 20..51)?
I'm trying to build model for this datatset (Age prediction):
- The input image has the shape:
3, 128, 128
and the predicted labels (ages) range between 20 to 51.
I want to build model and train it with MSE
and R2
metrics.
I built the following model:
def GetPretrainedModel():
oModel = torchvision.models.resnet50(pretrained=True)
for mParam in oModel.parameters():
if False == isinstance(mParam, nn.BatchNorm2d):
mParam.requires_grad = False
dIn = oModel.fc.in_features
oModel.fc = nn.Sequential(
nn.Linear(dIn, 512), nn.ReLU(),
nn.Linear(512, 256), nn.ReLU(),
nn.Linear(256, 128), nn.ReLU(),
nn.Linear(128, 1)
)
return oModel
- In order to train the model, Is it worth updating the input true age values to values between 0 to 30 or between 0 to 1 ?
- Is there a recommendation to add another layer to the model which will change the output values to the range between [20..50] ?
Topic mse r-squared deep-learning
Category Data Science