Do we have a set_default_dtype in libtorch

In python, we have torch.set_default_dtype, but I did not find a similar method in libtorch, do we have one?

Thanks.

1 Like

It’s defined here: https://github.com/pytorch/pytorch/blob/master/c10/core/DefaultDtype.h#L10
And can be accessed trough torch::set_default_dtype.