def _convert_format()

in src/utils.py [0:0]


    def _convert_format(self, data, expected_dims):
        if not type(data) == th.Tensor:
            data = th.Tensor(data)
        if len(data.shape) < expected_dims:
            data = data.unsqueeze(0)
        if not len(data.shape) == expected_dims:
            raise Exception(f"FourierTransform: data needs to be a Tensor with {expected_dims} dimensions but got shape {data.shape}")
        return data