If I dont something like this:

auto Xbt = torch::zeros({ batch_size, 10, 5, (3 + p) });
Xbt.narrow(0, 0, 1) = Xm.repeat({ 10, 1 }).view({ 10, 5, (3 + p) });

Will be the same as ‘like’:

Xbt[0] = Xm.repeat({ 10, 1 }).view({ 10, 5, (3 + p) });

I just wanted to do something like this from Python:

Xbt[0, :, : , : ] = Xm.repeat(10, 1).view(10, 5, (3 + p))