Thank you for your reply. I have replaced my code with
output = output + self.bias.view(self.out_channels, -1)

Now I am getting the following error

RuntimeError: Function ‘ExpBackward0’ returned nan values in its 0th output.