Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ To release a new version, please update the changelog as followed:
- Issue #498 - Deprecation Warning Fix in `tl.files` with truth value of an empty array is ambiguous (by @DEKHTIARJonathan in #575)
- Issue #565 related to `tl.utils.predict` fixed - `np.hstack` problem in which the results for multiple batches are stacked along `axis=1` (by @2wins in #566)
- Issue #572 with `tl.layers.DeformableConv2d` fixed (by @DEKHTIARJonathan in #573)
- Issue #664 with `tl.layers.ConvLSTMLayer` fixed (by @dengyueyun666 in #676)
- Typo of the document of ElementwiseLambdaLayer (by @zsdonghao in #588)
- Error in `tl.layers.TernaryConv2d` fixed - self.inputs not defined (by @DEKHTIARJonathan in #658)
- Deprecation warning fixed in `tl.layers.binary._compute_threshold()` (by @DEKHTIARJonathan in #658)
Expand Down
7 changes: 6 additions & 1 deletion tensorlayer/layers/recurrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,9 +763,14 @@ def __init__(
self.batch_size = batch_size
outputs = []
self.cell = cell = cell_fn(shape=cell_shape, filter_size=filter_size, num_features=feature_map)

if initial_state is None:
self.initial_state = cell.zero_state(batch_size, dtype=LayersConfig.tf_dtype) # dtype=tf.float32) # 1.2.3
self.initial_state = cell.zero_state(batch_size, dtype=LayersConfig.tf_dtype)
else:
self.initial_state = initial_state

state = self.initial_state

# with tf.variable_scope("model", reuse=None, initializer=initializer):
with tf.variable_scope(name, initializer=initializer) as vs:
for time_step in range(n_steps):
Expand Down