Say we have a tensor T of size [s, s].
How do I create a mask tensor of size [s*s, s, s] where for each tensor only 1 entry is equal to 1.
E.g for s = 3 mask tensor would look like
[
[[1, 0, 0], [0,0,0], [0, 0, 0]],
[[0, 1, 0], [0,0,0], [0, 0, 0]],
[[0, 0, 1], [0,0,0], [0, 0, 0]],
...
[[0, 0, 0], [0,0,0], [0, 0, 1]]
]

Thanks!