我想为图像分割项目实现一个卷积-反卷积网络。在反卷积部分,我计划将特征图上采样 2。例如原始特征图的维度为 64*64*4,我想将其上采样为 128*128*4。有谁知道这样做的张量操作?谢谢!
最佳答案
您可以使用 tf.image.resize_images()
.它需要批量图像或单张图像,并支持最常见的方法,例如bilinear
和 nearest_neighbor
.
这是 TensorFlow API 引用的链接:resizing
也可以看看tflearn等更高级别的API中是如何实现上采样操作的.您可以找到 upsample_2d
和 upscore_layer
在他们的 Github 仓库中:conv.py
注:输出可能会强制转换为 tf.float32
在较旧的 TF 版本中
关于tensorflow - TensorFlow 中的上采样特征图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36547615/