There are two types of data: numpy and torch
z = mean.clone().detach() + eps * torch.exp(logstd)
An error is reported in the source code, which is modified as follows
eps = eps.cuda() z = mean.cuda()+ eps * torch.exp(logstd).cuda()
It is to add CUDA() after numpy, such as reshape
Similar Posts:
- Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same
- [Solved] pytorchImportError: numpy.core.multiarray failed to import
- [Solved] TypeError: can’t convert CUDA tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.
- Solutions to errors encountered by Python
- [Solved] RuntimeError: Attempting to deserialize object on CUDA device 2 but torch.cuda.device_count() is 1
- Error in loading pre training weight in torch. Load() in pytorch
- How to Solve DeprecationWarning: Passing 1d arrays as data is deprecated in 0.17 and willraise ValueErr…
- [Solved] torch.cuda.CudaError: CUDA driver version is insufficient for CUDA runtime version (35) [ WARN:0
- [Solved] Pycharm Error: Error: failed to send plot to http://127.0.0.1:63342
- Runtimeerror: CUDA error: out of memory [How to Solve]