I wrote a function that makes upsampling in a different way from what does Upsampling2D. I wrapped this function in tf.py_function and I wrapped that in a Lambd
tf.py_function