Bug调试
Tensorflow用tf.nn.conv2D()实现空洞卷积,具体代码如下:
out_tensor = tf.nn.conv2d(
in_place, filter=filter_tensor, strides=(1, 1, 1, 1),
padding=‘SAME’, dilations=(1, dilation_rate, dilation_rate, 1),
data_format=‘NHWC’)
dilation_rate>1,出现下面错误
InvalidArgumentError (see above for traceback): Current implementation does not yet support dilations in the batch and depth dimensions.
最终发现是tensorflow的一个bug,我使用的是1.9版本,1.10版本以上解决了该问题。
参考tensorflow github记录:tf.nn.conv2d() inconsistent dilation rate at runtime #20908