What happens when i do detach to hidden state during forward loop?

Hi,
if i do this in the forward loop what will happen?
x, self.state = self.lstm_layer(x, self.state)
self.state = repackage_hidden(self.state)

thanks