I am training a model with tensorflow 2.x.
Up to now, I was using 2.14.1 and I had no issue. Now, I upgraded to 2.16.2 (also tried 2.17.0) and the same code doesn’t work anymore. The whole model creation works, I can do everything up to the training itself (with model.fit(….)). Once the training starts, tf is complaining that I did not compile my model with a loss function.
However, this is what I have:
model.compile(optimizer="adam",
loss = tf.keras.losses.CategoricalCrossentropy(),
metrics = all_metrics)
I tried also with the GPU disabled and I have the same issue. I really want to stress out that this is working fine in 2.14.1. I need the new version as I want to use tensorflow probability.
Anyone has an idea on why this is happening?
Thanks,