diff --git a/keras_vggface/models.py b/keras_vggface/models.py index 28e11c0..35ed1ae 100644 --- a/keras_vggface/models.py +++ b/keras_vggface/models.py @@ -8,19 +8,19 @@ ''' - -from keras.layers import Flatten, Dense, Input, GlobalAveragePooling2D, \ - GlobalMaxPooling2D, Activation, Conv2D, MaxPooling2D, BatchNormalization, \ +from keras.layers import BatchNormalization +from tensorflow.python.keras.layers import Flatten, Dense, Input, GlobalAveragePooling2D, \ + GlobalMaxPooling2D, Activation, Conv2D, MaxPooling2D, \ AveragePooling2D, Reshape, Permute, multiply 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 tensorflow.python.keras.utils.data_utils import get_file +from tensorflow.python.keras import backend as K from keras_vggface import utils -from keras.utils.layer_utils import get_source_inputs +from tensorflow.python.keras.utils.layer_utils import get_source_inputs import warnings -from keras.models import Model -from keras import layers +from tensorflow.python.keras.models import Model +from tensorflow.python.keras import layers + def VGG16(include_top=True, weights='vggface', diff --git a/keras_vggface/utils.py b/keras_vggface/utils.py index dd0d9d0..ab90545 100644 --- a/keras_vggface/utils.py +++ b/keras_vggface/utils.py @@ -9,7 +9,7 @@ import numpy as np from keras import backend as K -from keras.utils.data_utils import get_file +from tensorflow.python.keras.utils.data_utils import get_file V1_LABELS_PATH = 'https://github.com/rcmalli/keras-vggface/releases/download/v2.0/rcmalli_vggface_labels_v1.npy' V2_LABELS_PATH = 'https://github.com/rcmalli/keras-vggface/releases/download/v2.0/rcmalli_vggface_labels_v2.npy'