I just tried this in an interpreter:
import torch
a=torch.randn(10, 20)
torch.stack([torch.atan(a), torch.exp(a), a], dim=1)

It seems to have worked as expected.
What’s the full error and stack-trace that you see and what version of pytorch are you on? print(tc.__version__)