PaConvert
PaConvert copied to clipboard
got the wrong result when using paconvet
- Pytorch
import torch.backends.cudnn as cudnn
cudnn.benchmark = True
- Paddle
import paddle
False = True
定位分析:这里目前只考虑了 cudnn.benchmark 作为值 (getter) 的用法,尚未处理 setter (operator=) 的操作。
@RedContritio 因为目前Paddle没有cudnn.benchmark 的操作,属于功能缺失,所以目前只能用一个bool值作占位符,使得转换后的代码形式大体正常。
cudnn.benchmark = True
再请问一下,这个case是具体实际模型中的用法case吗
@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