Problem description
The code running Zheng Zhedong’s aicity2020 reported an error. After searching, it was found that the problem is that the code running is more than GPU, but the specified code is a single GPU
Solution:
In test2020.py, the code comments in lines 126 and 129 are replaced by the following code
# set gpu ids
# if len(gpu_ids)>0:
# torch.cuda.set_device(gpu_ids[0])
# cudnn.benchmark = True
os.environ['CUDA_VISIBLE_DEVICES'] = str(gpu_ids[0])
Read More:
- [Solved] RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and
- [Solved] RuntimeError: 1only batches of spatial targets supported (non-empty 3D tensors) but got targets of s
- RuntimeError: Integer division of tensors using div or / is no longer supported, and in a future rel
- How to Solve Error:options.query cannot be used with loaders
- How to Solve VMware Workstation Error: This virtual machine appears to be in use.
- How to Solve Error: java.io.IOException: Resource [classpath:shiro.ini] could not be found.
- How to Solve brew ERROR in `initialize‘: Version value must be a string; got a NilClass ()
- How to Solve RemoveError: setuptools is a dependency of conda and cannot be removed from conda
- calico Error: Calico requires net.ipv4.conf.all.rp_filter to be set to 0 or 1
- Arrays must all be same length [How to Solve]
- How to Solve QT Error: The build directory needs to be at the same level as the source directory.
- [Solved] RuntimeError: each element in list of batch should be of equal size
- [Solved] Springboot WARNING: All illegal access operations will be denied in a future release
- Error in Tensorflow using variables: List of Tensors when single Tensor expected
- [Solved] RuntimeError: CUDA error: out of memory
- [Solved] RuntimeError: cuDNN error: CUDNN_STATUS_INTERNAL_ERROR
- [Solved] adb Error: error: no devices/emulators found error: cannot connect to daemon
- TensorFlow issue: Expected int32, got list containing Tensors of type ‘_Message’ instead.
- How to Solve Git submodule update error
- How to Solve golang test Error: # command-line-arguments [command-line-arguments.test]