welcome to my blog
Problem description
Implements Torch. Log (tor.from_numpy (NP.array ([1,2,2]))))
t implemented for ‘Long’
why
Long data does not support log operations. Why is a Tensor a Long?Since the numpy array is created without specifying a dtype, int64 is used by default, so when the numpy array is converted to torch.tensor, the data type becomes Long
The solution
Reset torch.log(torch.from_numpy(np.array([1,2,2],np.float)))
Read More:
- RuntimeError: ‘lengths’ argument should be a 1D CPU int64 tensor, but got 1D cuda:0 Long tensor
- RuntimeError: reciprocal is not implemented for type torch.cuda.LongTensor
- Solve the runtimeerror in RNN: expected scalar type long but found float error
- RuntimeError: “unfolded2d_copy“ not implemented for ‘Half‘
- Run time error: “unfolded2d”_ copy“ not implemented for ‘Half‘
- [How to Fix] Fatal error: init(coder:) has not been implemented
- VBoxManage.exe: error: Resize hard disk operation for this format is not implemented yet!
- cv2 error – function not implemented [How to Solve]
- Hot Swap failed:add method not implemented
- An error is displayed when virtualbox uses modifyhd command to expand capacity: Resize medium operation for this format is not implemented yet
- IIS “Bad Request – Request Too Long. HTTP Error 400. The size of the request headers is too long.”
- Bad Request – Request Too Long. HTTP Error 400. The size of the request headers is too long
- Consult IDE log for more details (Help | Show Log),read failed, socket might closed or timeout,
- Python learning notes (5) — cross entropy error runtimeerror: 1D target tensor expected, multi target not supported
- RuntimeError: Found dtype Double but expected Float”
- raise RuntimeError(“tf.placeholder() is not compatible with “ RuntimeError: tf.placeholder() is not
- @In slf4j log.info Compile error: cannot find symbol log
- RuntimeError: cuda runtime error (801) : operation not supported at ..
- raise RuntimeError(RuntimeError: ‘cryptography‘ package is required for sha256_password or caching
- Dell server reported CPU 1 has an internal error (ierr)