Solved by vainaijr in post #4 
              
              
                maybe implementation of torch.repeat is here, 


where they say, add new leading dimensions to the tensor if the number of target dimensions is larger than the number of source dimensions, that is this, 
 [Screenshot (652)]