Yes, I guess you are passing z or c as an int while a tensor is expected:
z, c = torch.randn(1, 1), torch.randn(1, 1)

out = torch.cat([z, c], dim=1) # works if both inputs are tensors

c = 1
out = torch.cat([z, c], dim=1)
# > TypeError: expected Tensor as element 0 in argument 0, but got int