std :: ml::module
Function std::model_to
generic<M: Parameterized> int model_to(&M m, int device)Places the whole state (parameters and buffers) on 'device' (device.h): the model then trains and runs there through the same calls. 1 when every tensor moved; an optimizer's moments follow its parameters on their next step. DEVICE_AUTO picks device_default().