Skip to content

Commit 7637de7

Browse files
authored
[src] Fix for nnet3 bug encountered when implementing deltas. (#3495)
1 parent 07c9d97 commit 7637de7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/nnet3/nnet-compile.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,6 +1361,15 @@ void Compiler::OutputDebugInfo(NnetComputation *computation) const {
13611361
NnetComputation::MatrixDebugInfo &debug_info =
13621362
computation->matrix_debug_info[value_matrix];
13631363
debug_info.is_deriv = false;
1364+
if (!debug_info.cindexes.empty()) {
1365+
// This can happen if we created an alias for a node using a
1366+
// dim-range-node that covers all the dimensions (would satisfy
1367+
// IsWholeMatrix() above while not being a unique matrix). We sometimes
1368+
// do that to work around compiler constraints when creating expressions
1369+
// that have the same quantity with more than one scaling value within the
1370+
// same expression (like for computing deltas).
1371+
continue;
1372+
}
13641373
AppendCindexes(step_info.node_index, step_info.output_indexes,
13651374
&debug_info.cindexes);
13661375
if (deriv_matrix != 0) {

0 commit comments

Comments
 (0)