How does one set ALL parameters of a net to train false?

Ideally in the fewest lines of code…if

 net.not_train() #dont train THIS net at all

exists would be ideal…

related:

for p in m.paramters(): p.requires_grad_(False) ?
The longer way is just two lines though…

or just define your own method.