不同高度和宽度的跨步

2024-04-19 17:18:50 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用Tensorflow来处理1D信号(形状是(?, 5000, 1, 12)),并希望执行步幅操作。但是,当我尝试tf.nn.conv2d(input_variable, W, strides=[1, stride, 1, 1], padding='SAME')时,我得到一个值错误:

/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/common_shapes.pyc in conv2d_shape(op)
    207   if stride_r != stride_c:
    208     # TODO(shlens): Add support for this.
--> 209     raise ValueError("Current implementation only supports equal length "
    210                      "strides in the row and column dimensions.")
    211 

ValueError: Current implementation only supports equal length strides in the row and column dimensions.

对于当前实现的限制,是否有一个已知的解决方法,它只允许我进行水平跨步?在


Tags: andtheinonlycolumnequalcurrentlength