ITADN

Replace deprecated function parameters in torchvision API for Inception model

#88Pull RequestJannikWolff 创建于 2022-11-07
J
JannikWolffcommented
PyTorch changed the model zoo API, see https://pytorch.org/vision/main/models/generated/torchvision.models.inception_v3.html The following equivalences hold: ``` pretrained=False -> weights=None pretrained=True -> weights='DEFAULT' ``` The old code produces the following warnings ``` torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead. warnings.warn( torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=None`. warnings.warn(msg) ```
合并状态:未合并 关闭于 2023-01-04 1 条评论