Two tensor with different shape, how to get the same value index from the first

two tensors with different shapes, how to get the same value index from the first
for example, A shape is [5,5,5,5], B is [5,5,3,3], how to get the same values indexes from
A