Adrian_Briceno_Aguil:

What does it mean broadcasting the tensors? I apologize for my ignorance.


PyTorch uses broadcasting to expand smaller dimensions in your tensors, so that they would match the expected tensor shapes for the current operation, if possible.
The numpy doc explains it pretty well.
In your example I assume you would like to subtract the tensors elementwise.
However, since the first tensor has an additional dimension, broadcasting will be applied as seen in this better example:
# expected
x = torch.arange(10)
y = torch.arange(10)
diff = x - y
print(diff)
> tensor([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])

# your code
x = torch.arange(10).view(10, 1)
y = torch.arange(10)
diff = x - y
print(diff)
> tensor([[ 0, -1, -2, -3, -4, -5, -6, -7, -8, -9],
          [ 1,  0, -1, -2, -3, -4, -5, -6, -7, -8],
          [ 2,  1,  0, -1, -2, -3, -4, -5, -6, -7],
          [ 3,  2,  1,  0, -1, -2, -3, -4, -5, -6],
          [ 4,  3,  2,  1,  0, -1, -2, -3, -4, -5],
          [ 5,  4,  3,  2,  1,  0, -1, -2, -3, -4],
          [ 6,  5,  4,  3,  2,  1,  0, -1, -2, -3],
          [ 7,  6,  5,  4,  3,  2,  1,  0, -1, -2],
          [ 8,  7,  6,  5,  4,  3,  2,  1,  0, -1],
          [ 9,  8,  7,  6,  5,  4,  3,  2,  1,  0]])

As you can see, the second approach subtracts the y from each row in x and broadcasts the row value to match the dimensions.
This would increase the memory usage to store the result and might not be what you want to use.