Answer by nio1814 for Tensorflow equivalent of the Keras function: UpSampling2D
There is tf.keras.layers.UpSampling2D. I'm not exactly sure, but I think the tf.image functions are implemented on the CPU only.
View ArticleAnswer by amirbar for Tensorflow equivalent of the Keras function: UpSampling2D
Assuming x is of shape (BATCH_SIZE, H, W, C), you can use tf.image.resize_nearest_neighbor, which is the backend implementation used by keras: x = tf.image.resize_nearest_neighbor(x, (2*H,2*W))
View ArticleTensorflow equivalent of the Keras function: UpSampling2D
I would like to use the Keras layer: from keras.layers.convolutional import UpSampling2D x = UpSampling2D((2, 2))(x) How can I replicate this behavior with native tensorflow ? I can't manage to find...
View Article
More Pages to Explore .....