From 60573c4d4f1de6bbab27f06cff9616428bdcb2f4 Mon Sep 17 00:00:00 2001 From: Arnaud Wanet Date: Fri, 12 Nov 2021 08:16:09 +0100 Subject: [PATCH 1/3] Updated the import for keras applications. change the import statement the keras_application package from "from keras_application.imagenet_utils" to "from keras.applications.imagenet_uti --- keras_vggface/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keras_vggface/models.py b/keras_vggface/models.py index cc838b7..690ef62 100644 --- a/keras_vggface/models.py +++ b/keras_vggface/models.py @@ -12,7 +12,7 @@ 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 b77d87f4553805a861c51603f953a9adb02130f5 Mon Sep 17 00:00:00 2001 From: Arnaud Wanet Date: Fri, 12 Nov 2021 08:29:42 +0100 Subject: [PATCH 2/3] updated import statement for the get_source_inputs method --- keras_vggface/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keras_vggface/models.py b/keras_vggface/models.py index 690ef62..6e30e32 100644 --- a/keras_vggface/models.py +++ b/keras_vggface/models.py @@ -17,7 +17,7 @@ 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 From 2231e14357cf55a000c68a977486c2abd3521821 Mon Sep 17 00:00:00 2001 From: ironOnet Date: Fri, 12 Nov 2021 10:56:43 +0100 Subject: [PATCH 3/3] updated old imports from a deprecated keras package --- keras_vggface/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keras_vggface/models.py b/keras_vggface/models.py index 6e30e32..db2951e 100644 --- a/keras_vggface/models.py +++ b/keras_vggface/models.py @@ -12,7 +12,7 @@ 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 @@ -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(),