mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 12:05:22 +00:00
unused sequantial removed
This commit is contained in:
parent
4f48d97606
commit
cb0285709e
@ -140,9 +140,7 @@ def load_model(
|
|||||||
file_name="vgg_face_weights.h5", source_url=url
|
file_name="vgg_face_weights.h5", source_url=url
|
||||||
)
|
)
|
||||||
|
|
||||||
model = weight_utils.load_model_weights(
|
model = weight_utils.load_model_weights(model=model, weight_file=weight_file)
|
||||||
model=model, weight_file=weight_file
|
|
||||||
)
|
|
||||||
|
|
||||||
# 2622d dimensional model
|
# 2622d dimensional model
|
||||||
# vgg_face_descriptor = Model(inputs=model.layers[0].input, outputs=model.layers[-2].output)
|
# vgg_face_descriptor = Model(inputs=model.layers[0].input, outputs=model.layers[-2].output)
|
||||||
@ -151,7 +149,6 @@ def load_model(
|
|||||||
# - softmax causes underfitting
|
# - softmax causes underfitting
|
||||||
# - added normalization layer to avoid underfitting with euclidean
|
# - added normalization layer to avoid underfitting with euclidean
|
||||||
# as described here: https://github.com/serengil/deepface/issues/944
|
# as described here: https://github.com/serengil/deepface/issues/944
|
||||||
base_model_output = Sequential()
|
|
||||||
base_model_output = Flatten()(model.layers[-5].output)
|
base_model_output = Flatten()(model.layers[-5].output)
|
||||||
# keras backend's l2 normalization layer troubles some gpu users (e.g. issue 957, 966)
|
# keras backend's l2 normalization layer troubles some gpu users (e.g. issue 957, 966)
|
||||||
# base_model_output = Lambda(lambda x: K.l2_normalize(x, axis=1), name="norm_layer")(
|
# base_model_output = Lambda(lambda x: K.l2_normalize(x, axis=1), name="norm_layer")(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user