Using libtorch to implement DQN

I need to implement DQN algorithm using libtorch. But it seems that libtorch didn’t provide
the method of copying the parameters from the training network to the target network, which is necessary for DQN.

The corresponding Python code is like this:

 def update_target_q_network(self):
        self.target_model.load_state_dict(self.model.state_dict())

Are there any practical solutions to this question?