System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): MacOS
TensorFlow installed from (source or binary): Colab
TensorFlow version (use command below): 2.5.0
Python version: python 3.7
GPU model and memory: Tesla T4

Error
TypeError: Input 'y' of 'Sub' Op has type float16 that does not match type float32 of argument 'x'
Current behaviour
While using Mixed Precision and building a Keras Functional API model (EfficientNet B0), it shows the below error

image1870×762 160 KB


image2496×684 128 KB

Describe the expected behaviour
The Global Policy I set in the previous cell was mixed_float16. The problem works fine when running on tensorflow 2.4.1 so the bug is with tensorflow 2.5.0
You can reproduce the same error using the below notebook :
  
      

      colab.research.google.com
  

  
    

Google Colaboratory 24