Libtorch set default type

hi,I’m constructing a neural network using libtorch, how can I set the default data type to the Double?

I think the proper approach would be to use the AutoDefaultDtypeMode RAII in libtorch via:

AutoDefaultDtypeMode dtype_mode(default_dtype);

auto tensor = torch::tensor(1.f); // should be created in the default_dtype

where default_dtype is c10::ScalarType.

Thank you very much!I will try it right away,haha