estimate the graphic memory needed for your neural network according to the model parameters, the middle variables and the batch size.