v1.type()
will not work on Variables. One has to use v1.data.type()
there.
Also, it is recommended to use type(v1)
.
However, my problem was, that one tensor was on the GPU whereas the other one was on the CPU.
v1.type()
will not work on Variables. One has to use v1.data.type()
there.
Also, it is recommended to use type(v1)
.
However, my problem was, that one tensor was on the GPU whereas the other one was on the CPU.