hookeai.utilities.type_conversion

Torch data types enforcement and conversion.

Functions

convert_dict_to_tensor

Convert all int, float and bool in dictionary to torch.Tensor.

convert_tensor_to_float32

Convert floating point torch tensor to torch.float32.

convert_dict_to_float32

Convert all floating point torch tensors in dictionary to torch.float32.

convert_tensor_to_float64

Convert floating point torch tensor to torch.float64.

convert_dict_to_float64

Convert all floating point torch tensors in dictionary to torch.float64.

Functions

convert_dict_to_float32(tensor_dict[, ...])

Convert all floating point torch tensors in dictionary to torch.float32.

convert_dict_to_float64(tensor_dict[, ...])

Convert all floating point torch tensors in dictionary to torch.float64.

convert_dict_to_tensor(data_dict[, is_inplace])

Convert all int, float and bool in dictionary to torch.Tensor.

convert_tensor_to_float32(tensor)

Convert floating point torch tensor to torch.float32.

convert_tensor_to_float64(tensor)

Convert floating point torch tensor to torch.float64.