问题:
Disable or able cudnn,查询版本。
Disable cudnn for batch_norm: (See: @Microsoft / human-pose-estimation.pytorch#installation)
# PYTORCH=/path/to/pytorch # for pytorch v0.4.0 sed -i "1194s/torch\.backends\.cudnn\.enabled/False/g" ${PYTORCH}/torch/nn/functional.py # for pytorch v0.4.1 sed -i "1254s/torch\.backends\.cudnn\.enabled/False/g" ${PYTORCH}/torch/nn/functional.py # Note that instructions like # PYTORCH=/path/to/pytorch indicate that you should pick # a path where you'd like to have pytorch installed and then set an environment # variable (PYTORCH in this case) accordingly.
For other pytorch version
import torch print(torch.backends.cudnn.version())
对我来说
7501
所以,
sed -i "7501s/torch\.backends\.cudnn\.enabled/False/g" ${PYTORCH}/torch/nn/functional.py
博客提及禁用或启用Cudnn以及查询版本的问题,还提到在batch_norm中禁用cudnn,给出了相关参考链接,适用于其他pytorch版本。
483

被折叠的 条评论
为什么被折叠?



