def depth_to_space_tf(input, scale, data_format=None):
''' Uses phase shift algorithm to convert channels/depth for spatial resolution '''
import tensorflow as tf
if data_format is None:
data_format = K.image_dim_ordering()
data_format = data_format.lower()
input = K._preprocess_conv2d_input(input, data_format)
out = tf.depth_to_space(input, scale)
out = K._postprocess_conv2d_output(out, data_format)
return out
layers.py 文件源码
python
阅读 27
收藏 0
点赞 0
评论 0
评论列表
文章目录