4uiiurz1 / keras-arcface

Keras implementation of ArcFace, CosFace, and SphereFace
MIT License
282 stars 65 forks source link

different examples #22

Open sonfire186 opened 4 years ago

sonfire186 commented 4 years ago

I see different examples in README.md and archs.py

x = Dense(args.num_features, kernel_initializer='he_normal',
                kernel_regularizer=regularizers.l2(weight_decay))(x)
x = BatchNormalization()(x)
output = ArcFace(10, regularizer=regularizers.l2(weight_decay))([x, y])
x = Dense(512, kernel_initializer='he_normal')(x)
x = BatchNormalization()(x)
output = ArcFace(num_classes=10)([x, y])

Which examples is correct?

rlrahulkanojia commented 3 years ago

The first one seems better as it includes weight decay regularization, but both are correct.