Solved by amyxguo in post #3 
              
              
                I fixed the issue by replacing ndarray math operators (i.e. np.add, np.sub, np.ceil, and + - etc) with torch versions (i.e.torch.add, torch.sub etc).