Make logs TF compliant
# What does this PR do?

Currently when TensorFlow model is run in graph mode, the logs are displayed as many time the method is called even if the confition is not respected. This is because in graph mode the logs are not compiled in the graph and then are displayed all the time. To fix this, we use now `tf.print` that compiles the message inside the graph and will be displayed only when the conditions are respected.

## Fixes issue
#9285 
Okey for me