Skip to content

Commit

Permalink
Fix the lstm pseudo sample code
Browse files Browse the repository at this point in the history
  • Loading branch information
BruceDai committed May 8, 2023
1 parent c8f65e3 commit d4d8148
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2154,8 +2154,8 @@ partial interface MLGraphBuilder {
let output = builder.reshape(results[0], [1, null, hiddenSize]);
let cell = builder.reshape(results[1], [1, null, hiddenSize]);

nextHidden = (nextHidden ? builder.concat([nextHidden, result], 0) : output);
nextCell = (nextCell ? builder.concat([nextCell, result], 0) : cell);
nextHidden = (nextHidden ? builder.concat([nextHidden, output], 0) : output);
nextCell = (nextCell ? builder.concat([nextCell, cell], 0) : cell);
}

hiddenState = nextHidden;
Expand Down

0 comments on commit d4d8148

Please # to comment.