From 82a1ec66ce70d44fcb05309c7c5980aceb035b81 Mon Sep 17 00:00:00 2001 From: Hans Gaiser Date: Mon, 8 Jan 2018 19:58:20 +0100 Subject: [PATCH] Add deprecated functions to support old API. --- keras_retinanet/models/resnet.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/keras_retinanet/models/resnet.py b/keras_retinanet/models/resnet.py index a8e87364b..bac35edfe 100644 --- a/keras_retinanet/models/resnet.py +++ b/keras_retinanet/models/resnet.py @@ -14,6 +14,8 @@ limitations under the License. """ +import warnings + import keras import keras_resnet import keras_resnet.models @@ -93,3 +95,18 @@ def resnet101_retinanet(num_classes, inputs=None, weights='imagenet', **kwargs): def resnet152_retinanet(num_classes, inputs=None, weights='imagenet', **kwargs): return resnet_retinanet(num_classes=num_classes, backbone=152, inputs=inputs, weights=weights, **kwargs) + + +def ResNet50RetinaNet(inputs, num_classes, *args, **kwargs): + warnings.warn("ResNet50RetinaNet is replaced by resnet50_retinanet and will be removed in a future release.") + return resnet50_retinanet(num_classes, inputs, *args, **kwargs) + + +def ResNet101RetinaNet(inputs, num_classes, *args, **kwargs): + warnings.warn("ResNet101RetinaNet is replaced by resnet101_retinanet and will be removed in a future release.") + return resnet101_retinanet(num_classes, inputs, *args, **kwargs) + + +def ResNet152RetinaNet(inputs, num_classes, *args, **kwargs): + warnings.warn("ResNet152RetinaNet is replaced by resnet152_retinanet and will be removed in a future release.") + return resnet152_retinanet(num_classes, inputs, *args, **kwargs)