-
Notifications
You must be signed in to change notification settings - Fork 837
新增 torchvision 和 paddle.vision 的对应关系(第三批) #6959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
新增 torchvision 和 paddle.vision 的对应关系(第三批) #6959
Conversation
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-6959.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
...rt/convert_from_pytorch/api_difference_third_party/torchvision/torchvision.models.alexnet.md
Outdated
Show resolved
Hide resolved
docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md
Outdated
Show resolved
Hide resolved
|
||
| torchvision | PaddlePaddle | 备注 | | ||
| ----------- | ------------ | ---- | | ||
| weights | pretrained | 预训练权重,Paddle 参数 pretrained 为 bool 类型,PyTorch 参数 weights 为 VGG11_BN_Weights 类型,需要转写。| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个应该就只能是 VGG11_BN_Weights.DEFAULT吧,也就只有一个选择,本质是还是一个bool,推测是paddle相关的开发者简化了这里的设计
是不是判断kwargs中有weights参数,就设置pretrained为True,反之就为False
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有的模型是可以选择的,比如 mobilenet_v2 就可以选择 MobileNet_V2_Weights.IMAGENET1K_V1
或者 MobileNet_V2_Weights.IMAGENET1K_V2
https://pytorch.org/vision/stable/models/generated/torchvision.models.mobilenet_v2.html?highlight=mobilenet_v2#torchvision.models.mobilenet_v2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有的模型是可以选择的,比如 mobilenet_v2 就可以选择
MobileNet_V2_Weights.IMAGENET1K_V1
或者MobileNet_V2_Weights.IMAGENET1K_V2
https://pytorch.org/vision/stable/models/generated/torchvision.models.mobilenet_v2.html?highlight=mobilenet_v2#torchvision.models.mobilenet_v2
能选择的多吗,那这种就在映射文档里描述一下吧。
写Matcher的时候 还是直接转就行了,因为paddle是唯一的数据集,这个差异比较小就暂不处理了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不是很多。好的 👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- progress问题
- batch_norm问题
...rt/convert_from_pytorch/api_difference_third_party/torchvision/torchvision.models.alexnet.md
Outdated
Show resolved
Hide resolved
...onvert_from_pytorch/api_difference_third_party/torchvision/torchvision.models.densenet169.md
Outdated
Show resolved
Hide resolved
...vert/convert_from_pytorch/api_difference_third_party/torchvision/torchvision.models.vgg13.md
Outdated
Show resolved
Hide resolved
...vert/convert_from_pytorch/api_difference_third_party/torchvision/torchvision.models.vgg13.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@guozixu2001 后续在编写Matcher或单测时发现有问题需及时更正 |
* add conversion rules for built-in models of torchvision * fix typo * add torchvision in pytorch_api_mapping_cn.md * fix failed link in pytorch_api_mapping_cn.md * fix content id order * add description for torchvision model weights in conversion rules * add conversion examples for torchvision built-in model * fix issues about 'batch_norm' and 'progress' * update conversion examples to focus to ignore batch norm para
torchvision.datasets.VOCDetection
torchvision.ops.DeformConv2d
的对应关系中的问题