Center Loss in Keras <p>I want to implement center Loss explained in [<a href="http://ydwen.github.io/papers/WenECCV16.pdf]" rel="nofollow">http://ydwen.github.io/papers/WenECCV16.pdf]</a> in Keras</p> <p>I started to create a network with 2 outputs such as : </p> <pre><code>inputs = Input(shape=(100,100,3)) ... fc = Dense(100)(#previousLayer#) softmax = Softmax(fc) model = Model(input, output=[softmax, fc]) model.compile(optimizer='sgd', loss=['categorical_crossentropy', 'center_loss'], metrics=['accuracy'], loss_weights=[1., 0.2]) </code></pre> <p>First of all, doing like this, is it the good way to proceed? </p> <p>Secondly, I don't know how to implement the center_loss in keras. Center_loss looks like mean square error but instead of comparing values to fixed labels, it compares values to data updated at each iteration. </p> <p>Thank you for your help</p>