From b9caed838b65fb88a34dcfa99f3098ce5c4acd47 Mon Sep 17 00:00:00 2001 From: michuanhaohao <472675005@qq.com> Date: Fri, 18 Nov 2016 16:23:46 +0800 Subject: [PATCH] Update layers.py At line 963, comment '[filter_height, filter_width, in_channels, out_channels]' is replaced by '[filter_length, in_channels, out_channels]'. At line 1007, keyword 'strides' is replaced by 'stride', according to the conv1d function of tensorflow. --- tensorlayer/layers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tensorlayer/layers.py b/tensorlayer/layers.py index 526ff6489..ae02d6c4f 100755 --- a/tensorlayer/layers.py +++ b/tensorlayer/layers.py @@ -960,7 +960,7 @@ class Conv1dLayer(Layer): The `Layer` class feeding into this layer, [batch, in_width, in_channels]. act : activation function, None for identity. shape : list of shape - shape of the filters, [filter_height, filter_width, in_channels, out_channels]. + shape of the filters, [filter_length, in_channels, out_channels]. strides : a list of ints. The stride of the sliding window for each dimension of input.\n It Must be in the same order as the dimension specified with format. @@ -1004,7 +1004,7 @@ def __init__( W = tf.get_variable(name='W_conv1d', shape=shape, initializer=W_init, **W_init_args ) if b_init: b = tf.get_variable(name='b_conv1d', shape=(shape[-1]), initializer=b_init, **b_init_args ) - self.outputs = act( tf.nn.conv1d(self.inputs, W, strides=strides, padding=padding, + self.outputs = act( tf.nn.conv1d(self.inputs, W, stride=strides, padding=padding, use_cudnn_on_gpu=use_cudnn_on_gpu, data_format=data_format) + b ) #1.2 else: self.outputs = act( tf.nn.conv1d(self.inputs, W, strides=strides, padding=padding,