代码修改笔记

1./data/xxx/anaconda3/envs/xxx/lib/python3.7/site-packages/torch/functional.py:445: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at  ../aten/src/ATen/native/TensorShape.cpp:2157.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]

找到functional.py的第445行,
将 return _VF.meshgrid(tensors, **kwargs)
改为 return _VF.meshgrid(tensors, **kwargs,indexing='ij')、


2.
/data/xxx/anaconda3/envs/xxx/lib/python3.7/site-packages/torch/nn/functional.py:3635:
 UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
  "See the documentation of nn.Upsample for details.".format(mode)

只是个警告,没啥用


3.
RuntimeError: CUDA error: out of memory
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

import os

os.environ["CUDA_VISIBLE_DEVICES"] = "2" #2可以换

#只需要单GPU的话,选一块闲着的,用nvidia-smi查看

你可能感兴趣的:(python)