1. def forward(self, x):
2.         alpha = torch.randn(1,requires_grad= True).to(device = 'cuda')
3.         beta = torch.randn(1,requires_grad= True).to(device = 'cuda')
4.         out = F.relu(self.bn1(self.conv1(x)))
5.         out = self.bn2(self.conv2(out))
6.         num = torch.atan(torch.div((alpha*x),torch.sqrt((beta**2)+1)))
7.         num = num.to(device = 'cuda')
8.         den = alpha * torch.sqrt((beta**2)+1)
9.         den = den.to(device = 'cuda')
10.       x_tan = torch.div(num ,den).to(device = 'cuda')
11.       out = F.relu(out)
12.         return out


I have written above code while implementing my model which is subclass of torch.nn.module the problem i got at num (line 6) and mostly i will get them at den an x_tan. How to fix this??I am actually implementing BReGNext for facial expression recognition in Pytorch.Kindly help me with issue.Thanks in advance for the help.