Currently in our model_t (the physical model instantiated from s_model_t), we pre allocate memory for both the output tensor and the gradient tensor.
But the gradient tensor is not necessary when doing inference, we should refactor the model_t to only take one tensor, and use 2 model_t instances during training.
Currently in our
model_t
(the physical model instantiated froms_model_t
), we pre allocate memory for both the output tensor and the gradient tensor. But the gradient tensor is not necessary when doing inference, we should refactor the model_t to only take one tensor, and use 2 model_t instances during training.