TensorLayer安装:
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
TensorFlow(TF) 转为 TensorLayer(TL) : 通过 InputLayer 把 tensor 输入到 tl.layers
conv_11 = tf.nn.conv2d(input, filter, strides=[1,1,1,1],padding='SAME' ,name='{}_1x1'.format(name))
conv_11_layer = tl.layers.InputLayer(conv_11)
offset_11 = tl.layers.Conv2d(conv_11_layer, 18, (3, 3), (1, 1), padding="SAME")
deformable_conv_11 = tl.layers.DeformableConv2d(conv_11_layer, offset_11, 64, (3,3), name='deformable_conv_11')
* TensorLayer(TL) 转为 TensorFlow(TF) : 通过 network.outputs 获取 tensor
output_cat = tf.concat([deformable_conv_11.outputs, deformable_conv_22.outputs], 3, name='{}_concat'.format(name))