Skip to content

Commit 4f2f06f

Browse files
committed
Merge branch 'fix_bug_6' into main
2 parents 8814f40 + 66f3a92 commit 4f2f06f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

tensorlayerx/nn/core/common.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,8 @@ def construct_graph(inputs, outputs):
540540
if out_node.node_name not in indegrees.keys():
541541
indegrees[out_node.node_name] = len(out_node.in_nodes)
542542
indegrees[out_node.node_name] -= 1
543-
if indegrees[out_node.node_name] == 0:
543+
if indegrees[out_node.node_name] == 0 or \
544+
isinstance(out_node.layer, (tlx.nn.RNN, tlx.nn.LSTM, tlx.nn.GRU)):
544545
next_depth.append(out_node)
545546
cur_depth = next_depth
546547
next_depth = []

tensorlayerx/nn/layers/activation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ class Softmax(Module):
438438
def __init__(self, axis = -1):
439439
super(Softmax, self).__init__()
440440
self._built = True
441+
self.axis = axis
441442
self._softmax = tlx.ops.Softmax(axis)
442443

443444
def forward(self, x):

0 commit comments

Comments
 (0)