space_to_depth
Created by: zhao181
请问这个space_to_depth的API接口怎么理解啊? 有详细的资料吗?
[1] 为啥channel要能整除blocksize的平方? [2] 和原图对应以后 没有任何规律可言, [3] 我自己想了几种可能的space_to_depth的方案, 与paddle的结果也完全对应不上
I expect that the "space_to_depth" will be the inverse operation to "pixel_shuffle", but it is not. So very puzzled.
data_shape_1=(-1,4,28,28) data_shape_2=(1,4,28,28) data=fluid.layers.data(name="data",shape=data_shape_1,dtype="float32") Vardata1=fluid.layers.space_to_depth(data,blocksize=2) Vardata2=fluid.layers.pixel_shuffle(Vardata1,upscale_factor=2) temp=np.random.uniform(size=data_shape_2).astype(np.float32) exe=fluid.Executor(fluid.CPUPlace()) restore_data=exe.run(feed={"data":temp},fetch_list=[Vardata2]) differ=np.max(np.abs(np.subtract(temp,restore_data[0]))) ##0.98+
恳请谁能给提供下 中间计算过程的详细解释 非常感谢