diff --git a/keras_vggface/models.py b/keras_vggface/models.py index cc838b7..db2951e 100644 --- a/keras_vggface/models.py +++ b/keras_vggface/models.py @@ -12,12 +12,12 @@ from keras.layers import Flatten, Dense, Input, GlobalAveragePooling2D, \ GlobalMaxPooling2D, Activation, Conv2D, MaxPooling2D, BatchNormalization, \ AveragePooling2D, Reshape, Permute, multiply -from keras_applications.imagenet_utils import _obtain_input_shape +from keras.applications.imagenet_utils import obtain_input_shape from keras.utils import layer_utils from keras.utils.data_utils import get_file from keras import backend as K from keras_vggface import utils -from keras.engine.topology import get_source_inputs +from keras.utils.layer_utils import get_source_inputs import warnings from keras.models import Model from keras import layers @@ -27,7 +27,7 @@ def VGG16(include_top=True, weights='vggface', input_tensor=None, input_shape=None, pooling=None, classes=2622): - input_shape = _obtain_input_shape(input_shape, + input_shape = obtain_input_shape(input_shape, default_size=224, min_size=48, data_format=K.image_data_format(), @@ -208,7 +208,7 @@ def RESNET50(include_top=True, weights='vggface', input_tensor=None, input_shape=None, pooling=None, classes=8631): - input_shape = _obtain_input_shape(input_shape, + input_shape = obtain_input_shape(input_shape, default_size=224, min_size=32, data_format=K.image_data_format(), @@ -413,7 +413,7 @@ def SENET50(include_top=True, weights='vggface', input_tensor=None, input_shape=None, pooling=None, classes=8631): - input_shape = _obtain_input_shape(input_shape, + input_shape = obtain_input_shape(input_shape, default_size=224, min_size=197, data_format=K.image_data_format(),