pihnn.utils.get_complex_input#
- pihnn.utils.get_complex_input(input_value)#
- Convert the input value to the unified format (i.e., complex
torch.tensor
).The library allows to define some values in multiple and flexible ways (scalars, tuples, lists, tensors). Then, this method includes all the possible definitions and unify the type of the input value.- Parameters:
input_value (int/float/complex/list/tuple/
torch.tensor
) – Generic input value.- Returns:
new_value (callable) - Copy of the input value in the unified format.