Skip to content

Commit bb87d00

Browse files
Update ConvLSTMCell to accept shape as list or tuple
PiperOrigin-RevId: 228852641
1 parent c2ab6dc commit bb87d00

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tensorflow/contrib/rnn/python/ops/rnn_cell.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2071,7 +2071,7 @@ def __init__(self,
20712071
conv_ndims: Convolution dimensionality (1, 2 or 3).
20722072
input_shape: Shape of the input as int tuple, excluding the batch size.
20732073
output_channels: int, number of output channels of the conv LSTM.
2074-
kernel_shape: Shape of kernel as in tuple (of size 1,2 or 3).
2074+
kernel_shape: Shape of kernel as an int tuple (of size 1, 2 or 3).
20752075
use_bias: (bool) Use bias in convolutions.
20762076
skip_connection: If set to `True`, concatenate the input to the
20772077
output of the conv LSTM. Default: `False`.
@@ -2092,7 +2092,7 @@ def __init__(self,
20922092
self._conv_ndims = conv_ndims
20932093
self._input_shape = input_shape
20942094
self._output_channels = output_channels
2095-
self._kernel_shape = kernel_shape
2095+
self._kernel_shape = list(kernel_shape)
20962096
self._use_bias = use_bias
20972097
self._forget_bias = forget_bias
20982098
self._skip_connection = skip_connection
@@ -2172,7 +2172,7 @@ def _conv(args, filter_size, num_features, bias, bias_start=0.0):
21722172
Args:
21732173
args: a Tensor or a list of Tensors of dimension 3D, 4D or 5D,
21742174
batch x n, Tensors.
2175-
filter_size: int tuple of filter height and width.
2175+
filter_size: int tuple of filter shape (of size 1, 2 or 3).
21762176
num_features: int, number of features.
21772177
bias: Whether to use biases in the convolution layer.
21782178
bias_start: starting value to initialize the bias; 0 by default.

0 commit comments

Comments
 (0)