simclr icon indicating copy to clipboard operation
simclr copied to clipboard

WARNING:absl:Importing a function (__inference_sync_batch_normalization_13_layer_call_and_return_conditional_losses_20965) with ops with custom gradients. Will likely fail if a gradient is requested.

Open aynesss opened this issue 4 years ago • 0 comments

TF2.4. Here is what I write to begin finetuning:

target_model_path = "gs://simclr-checkpoints-tf2/simclrv2/pretrained/r50_2x_sk1/saved_model" 
saved_model = tf.keras.models.load_model(target_model_path)
saved_model.model.save_weights('./weights.h5')
simclr_model.load_weights('./weights.h5', by_name=True, skip_mismatch=True)

But I found many lines :+1:

WARNING:absl:Importing a function (__inference_sync_batch_normalization_57_layer_call_and_return_conditional_losses_47179) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:absl:Importing a function (__inference_sync_batch_normalization_21_layer_call_and_return_conditional_losses_22737) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:absl:Importing a function (__inference_sync_batch_normalization_21_layer_call_and_return_conditional_losses_22737) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:absl:Importing a function (__inference_sync_batch_normalization_21_layer_call_and_return_conditional_losses_22737) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:absl:Importing a function (__inference_sync_batch_normalization_13_layer_call_and_return_conditional_losses_20965) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:absl:Importing a function (__inference_sync_batch_normalization_13_layer_call_and_return_conditional_losses_20965) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:absl:Importing a function (__inference_sync_batch_normalization_13_layer_call_and_return_conditional_losses_20965) with ops with custom gradients. Will likely fail if a gradient is requested.

I can't understand the reason?

aynesss avatar Feb 15 '22 10:02 aynesss