How to use kDouble type input for Linear layer in C++

I found that one can use

model.to(torch::kDouble);

to cast parameters of the whole model to double type.