Are these the same in effect?

If the tensor does not require gradients, both will yield the same result.
However, if it does, you should stick to the first approach, as the second one will create a non-leaf variable as described here.