You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to load the contents of a Tensor from a stream, if the tensor isn't located on the CPU then the loading will fail. The reason seems to be located here, since the .to() method returns a new tensor when the tensor is copied to a new device.
Sample code:
vartensor1=torch.rand(10,device:torch.CUDA);// Save to memory streamusingvarms=newMemoryStream();tensor1.Save(newBinaryWriter(ms,Encoding.UTF8,true));ms.Position=0;tensor1.Load(newBinaryReader(ms));
Activity