In [4]: b = b.reshape(1,2,1,1)                                                                

In [5]: a + b                                                                                 
Out[5]: 
tensor([[[[ 5,  6,  7],
          [ 8,  9, 10],
          [11, 12, 13]],

         [[15, 16, 17],
          [18, 19, 20],
          [12, 13, 21]]]])

Does b.reshape return a copy? Seems like it’s not an in-place operation.