%matplotlib inline %reload_ext autoreload %autoreload 2
to_device
to_device(x:Union[Tensor, List[Tensor]], device:device=device(type='cpu'))
x
Union
Tensor
List
device
device(type='cpu')
Recursively place Tensor(s) onto device
Arguments: x: Tensor(s) to place on device
Returns: Tensor(s) on device
to_np
to_np(x:Tensor)
Convert Tensor x to a Numpy array
Arguments: x: Tensor to convert
Returns: x as a Numpy array
init_net
init_net(model:Module)
model
Module
Recursively initialise fully-connected ReLU network with Kaiming and zero bias