Currently, for 5D data (batch_size, h, w, depth, channel), the tf.keras.backend.resize_volumes or UpSampling3D can be used to upsampling purpose. For example, I can do
a = tf.ones(shape=(1, 100, 100, 64, 1))
tf.keras.backend.resize_volumes(
a, depth_factor=2,
height_factor=2,
width_factor=2,
data_format="channels_last").shape
TensorShape([1, 200, 200, 128, 1])
I saw this already. It’s not actually solving my issue.
In that SO, all they need to resize is height and width and not depth, I think. That’s why they were able to use tf.image.resize with two axes. Now, their issue can be solved also with the resize_volumes.
a = tf.ones(shape=(5, 50, 50, 10, 256))
tf.keras.backend.resize_volumes(
a,
depth_factor=2,
height_factor=2,
width_factor=1,
data_format="channels_last"
).shape
TensorShape([5, 100, 100, 10, 256])
Yes, visited this one too. I also noticed that the bot closed it. IMO, the bot needs to be fixed. It’s not only the OP who was facing this issue but many other users too.