q = (10 * torch.arange(3)[:, None] + torch.arange(4)).view(1, 3, 4)
B, T, C, H, d = 1, 3, 4, 2, 2
print(q)
tensor([[[ 0, 1, 2, 3],
[10, 11, 12, 13],
[20, 21, 22, 23]]])
Take B=1, T=3, C=4 and H=2, so d=2. Each number is 10t+c: the tens digit is the position t, and the ones digit is the channel c.