Solved by ptrblck in post #2 
              
              
                You could just index the bigger tensor and assign the smaller one to these positions: 
a = torch.zeros(5, 5)
a[2:, 2:] = torch.ones(3, 3)