Self-Supervised Learning tutorial fails with latest TensorFlow Similarity
labroskokkalas opened this issue · comments
labroskokkalas commented
Self-Supervised Learning tutorial fails in contrastive_model training with
File "C:\Users\lone_\AppData\Local\Continuum\anaconda3\envs\tf28-gpu\lib\site-packages\keras\engine\training.py", line 1021, in train_function *
return step_function(self, iterator)
File "C:\Users\lone_\AppData\Local\Continuum\anaconda3\envs\tf28-gpu\lib\site-packages\tensorflow_similarity\losses\simsiam.py", line 111, in call *
loss: FloatTensor = (
TypeError: Missing required positional argument
Google Colab also fails.
It is a typo
loss: FloatTensor = (
tf.math.multiply(per_example_projection * 0.5) + self.margin
)
should change to
loss: FloatTensor = (
tf.math.multiply(per_example_projection, 0.5) + self.margin
)
Owen Vallis commented
Thanks for issue. I'll push a fix shortly.