analogvnn.utils.to_tensor_parameter#

Module Contents#

Functions#

to_float_tensor(→ Tuple[Union[torch.Tensor, None], ...)

Converts the given arguments to torch.Tensor of type torch.float32.

to_nongrad_parameter(→ Tuple[Union[torch.nn.Parameter, ...)

Converts the given arguments to nn.Parameter of type torch.float32.

analogvnn.utils.to_tensor_parameter.to_float_tensor(*args) Tuple[Union[torch.Tensor, None], Ellipsis][source]#

Converts the given arguments to torch.Tensor of type torch.float32.

The returned tensors are not trainable.

Parameters:

*args – the arguments to convert.

Returns:

the converted arguments.

Return type:

tuple

analogvnn.utils.to_tensor_parameter.to_nongrad_parameter(*args) Tuple[Union[torch.nn.Parameter, None], Ellipsis][source]#

Converts the given arguments to nn.Parameter of type torch.float32.

The returned parameters are not trainable.

Parameters:

*args – the arguments to convert.

Returns:

the converted arguments.

Return type:

tuple