%matplotlib inline
%reload_ext autoreload
%autoreload 2

to_device[source]

to_device(x:Union[Tensor, List[Tensor]], device: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[source]

to_np(x:Tensor)

Convert Tensor x to a Numpy array

Arguments: x: Tensor to convert

Returns: x as a Numpy array

init_net[source]

init_net(model:Module)

Recursively initialise fully-connected ReLU network with Kaiming and zero bias