WeidiXie / VGG-Speaker-Recognition

Utterance-level Aggregation For Speaker Recognition In The Wild
362 stars 98 forks source link

Why we need to regularize outputs during eval mode? #43

Closed ghost closed 4 years ago

ghost commented 4 years ago

I'm rewriting this project on PyTorch and got confused with the code below. if mode == 'eval': y = keras.layers.Lambda(lambda x: keras.backend.l2_normalize(x, 1))(x) Is there some special reason behind that?

WeidiXie commented 4 years ago

Oh, this is for evaluating the cosine similarity,

you can either normalise in the model, or get the output embedding and normalise with bumpy.

ghost commented 4 years ago

Thank you for the quick reply!