PaConvert icon indicating copy to clipboard operation
PaConvert copied to clipboard

got the wrong result when using paconvet

Open GreatV opened this issue 2 years ago • 3 comments

  • Pytorch
import torch.backends.cudnn as cudnn

cudnn.benchmark = True
  • Paddle
import paddle

False = True

GreatV avatar Nov 30 '23 05:11 GreatV

定位分析:这里目前只考虑了 cudnn.benchmark 作为值 (getter) 的用法,尚未处理 setter (operator=) 的操作。

RedContritio avatar Dec 01 '23 10:12 RedContritio

@RedContritio 因为目前Paddle没有cudnn.benchmark 的操作,属于功能缺失,所以目前只能用一个bool值作占位符,使得转换后的代码形式大体正常。

cudnn.benchmark = True

再请问一下,这个case是具体实际模型中的用法case吗

zhwesky2010 avatar Dec 04 '23 03:12 zhwesky2010

@zhwesky2010 这个用的还挺多的

  • https://github.com/facebookresearch/dinov2/blob/2302b6bf46953431b969155307b9bed152754069/dinov2/eval/setup.py#L71
  • https://github.com/search?q=org%3Afacebookresearch%20cudnn.benchmark%20%3D%20True&type=code

GreatV avatar Dec 05 '23 12:12 GreatV