Skip to content

Commit

Permalink
Add deprecated functions to support old API.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans Gaiser authored and hgaiser committed Jan 9, 2018
1 parent c5860e7 commit 82a1ec6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions keras_retinanet/models/resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
limitations under the License.
"""

import warnings

import keras
import keras_resnet
import keras_resnet.models
Expand Down Expand Up @@ -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)

0 comments on commit 82a1ec6

Please sign in to comment.