diff --git a/ppcls/arch/backbone/model_zoo/convnext.py b/ppcls/arch/backbone/model_zoo/convnext.py index f30894eab526b8deb5e61a964dc287415f1b1a02..d074f3668e762ed9d3b70241e0bb4765545fba93 100644 --- a/ppcls/arch/backbone/model_zoo/convnext.py +++ b/ppcls/arch/backbone/model_zoo/convnext.py @@ -1,24 +1,16 @@ -# MIT License +# copyright (c) 2022 PaddlePaddle Authors. All Rights Reserve. # -# Copyright (c) Meta Platforms, Inc. and affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: +# http://www.apache.org/licenses/LICENSE-2.0 # -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # # Code was heavily based on https://github.com/facebookresearch/ConvNeXt @@ -138,7 +130,7 @@ class Block(nn.Layer): class ConvNeXt(nn.Layer): r""" ConvNeXt - A PyTorch impl of : `A ConvNet for the 2020s` - + A PaddlePaddle impl of : `A ConvNet for the 2020s` - https://arxiv.org/pdf/2201.03545.pdf Args: diff --git a/ppcls/arch/backbone/model_zoo/peleenet.py b/ppcls/arch/backbone/model_zoo/peleenet.py index a09091af23d7d2a67c2f8303b4f8c119f77e8593..d4a08e484c99b662e85e75494cf66cdca62ac16c 100644 --- a/ppcls/arch/backbone/model_zoo/peleenet.py +++ b/ppcls/arch/backbone/model_zoo/peleenet.py @@ -1,24 +1,16 @@ # copyright (c) 2022 PaddlePaddle Authors. All Rights Reserve. # -# MIT License +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: +# http://www.apache.org/licenses/LICENSE-2.0 # -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # # Code was heavily based on https://github.com/Robert-JunWang/PeleeNet # reference: https://arxiv.org/pdf/1804.06882.pdf @@ -33,7 +25,7 @@ from paddle.nn.initializer import Normal, Constant from ppcls.utils.save_load import load_dygraph_pretrain, load_dygraph_pretrain_from_url MODEL_URLS = { - "peleenet": "" # TODO + "PeleeNet": "" # TODO } __all__ = MODEL_URLS.keys() @@ -235,5 +227,5 @@ def _load_pretrained(pretrained, model, model_url, use_ssld): def PeleeNet(pretrained=False, use_ssld=False, **kwargs): model = PeleeNetDY(**kwargs) - _load_pretrained(pretrained, model, MODEL_URLS["peleenet"], use_ssld) + _load_pretrained(pretrained, model, MODEL_URLS["PeleeNet"], use_ssld) return model diff --git a/ppcls/configs/ImageNet/PeleeNet/PeleeNet.yaml b/ppcls/configs/ImageNet/PeleeNet/PeleeNet.yaml index 648f97040e36c135d4896386ced20b23d328d746..db2136a0a5090175b54a1391d668ae92e8407359 100644 --- a/ppcls/configs/ImageNet/PeleeNet/PeleeNet.yaml +++ b/ppcls/configs/ImageNet/PeleeNet/PeleeNet.yaml @@ -55,6 +55,8 @@ DataLoader: channel_first: False - RandCropImage: size: 224 + interpolation: bilinear + backend: pil - RandFlipImage: flip_code: 1 - NormalizeImage: @@ -83,6 +85,8 @@ DataLoader: channel_first: False - ResizeImage: resize_short: 256 + interpolation: bilinear + backend: pil - CropImage: size: 224 - NormalizeImage: @@ -108,6 +112,8 @@ Infer: channel_first: False - ResizeImage: resize_short: 256 + interpolation: bilinear + backend: pil - CropImage: size: 224 - NormalizeImage: