I have a dataset of 1000 items. I normalize the data before I train the model against it.
I would now like to use the model to make predictions. However, from what I understand, I need to normalize the inputs that I will feed to the model for which I need the predictions for. In order to carry this out, I would need the mean and std calculated at the time of training.
While I am able to print it to the console, how does one "save" it - to be used later? I am trying to understand the procedure here on how to save the mean and std used at the time of normalization of the training data - so that I can use it again at the time of making predictions.
I determined that we could first get the array representation of the tensor through:
and then, we save it to a file like any other string
To read it back and use it as a tensor, we would do the opposite:
This allowed me to save the mean and std for use later.