tianle-BigRice:

if i use the code in train:
            with t.no_grad() :
                score = model(input)

the parameter will not be updated?


Yes, the parameters will not get any gradients and thus the optimizer will not update them.



 tianle-BigRice:

and i use the code:
loss = checkpoint(criterion,score,target)

it didnt work


You should wrap blocks of the models into a checkpoint. You can find an older tutorial here 4.