Kakoedlinnoeslovo / center_loss

Here is my implementation of Center Loss with Keras
11 stars 2 forks source link

self.add_update((self.centers, new_centers), x) deprecated in TF 2.0 #3

Open suraj-maniyar opened 4 years ago

suraj-maniyar commented 4 years ago

Hi Kakoedlinnoeslovo,

Thanks for the code. I am trying to implement center-loss in Tensorflow 2.0 and found that some arguments in self.add_update are deprecated. It does not throw any error, but the centers are never updated. You can find the description here: https://github.com/tensorflow/tensorflow/blob/v2.1.0/tensorflow/python/keras/engine/base_layer.py#L1170-L1259

Can you provide a work around for this?

Thank you