You can use repeat – this will copy each vector 28 times.
X = torch.randn(100, 700)
X = X.unsqueeze(2).repeat(1, 1, 28)

Or you can use expand: this will only create a view, without copying any data.
X = torch.randn(100, 700)
X = X.unsqueeze(2).expand(100, 700, 28)