Hi,
You can try this package to see the generated graph to see why: torchviz 4 (Change the size of the first dimension to 10  )
As you will seem one created the output in one operation, while the other creates it by doing 1000 inplace operations.