std1.0.0-beta-7 SafeC docs

std :: ml::module

Function std::model_to

#include <std/ml/module.h> source

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().