张量流中的可变形卷积

时间:2018-05-18 08:58:57

标签: python tensorflow

我尝试使用python 3.5中的tensorlayer来运行一个简单的代码。我有这个错误::

[TL] DeformableConv2d ab: n_filter: 32, filter_size: (3, 3) act:relu
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/anaconda3/lib/python3.5/site-packages/tensorlayer/deprecation.py", line 24, in wrapper
    return f(*args, **kwargs)
  File "/home/anaconda3/lib/python3.5/site-packages/tensorlayer/layers/convolution.py", line 971, in __init__
    tf.reshape()
TypeError: reshape() missing 2 required positional arguments: 'tensor' and 'shape'

代码是:

import tensorflow as tf
import tensorlayer as tl

inp = tf.zeros([1,50,50,3])
inp = tl.layers.InputLayer(inp, 'inp')

offset = tl.layers.Conv2d(inp, 18, (3,3), (1,1), padding="SAME")

d = tl.layers.DeformableConv2d(inp, offset, 32, (3,3), name='a')

为什么会这样?

1 个答案:

答案 0 :(得分:2)

已经实施了错误修复,但我们还没有发布它。 如果您希望从源安装TL,可以执行以下操作:

pip uninstall tensorlayer  
pip install --upgrade tensorflow     # if you do not use GPU support
pip install --upgrade tensorflow-gpu # if you use GPU support
pip install git+https://github.com/tensorlayer/tensorlayer.git

1.8.6的RC版本将于本月底发布。