Skip to content

[src] Fix for nnet3 bug encountered when implementing deltas. #3495

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 28, 2019
Merged
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
9 changes: 9 additions & 0 deletions src/nnet3/nnet-compile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1361,6 +1361,15 @@ void Compiler::OutputDebugInfo(NnetComputation *computation) const {
NnetComputation::MatrixDebugInfo &debug_info =
computation->matrix_debug_info[value_matrix];
debug_info.is_deriv = false;
if (!debug_info.cindexes.empty()) {
// This can happen if we created an alias for a node using a
// dim-range-node that covers all the dimensions (would satisfy
// IsWholeMatrix() above while not being a unique matrix). We sometimes
// do that to work around compiler constraints when creating expressions
// that have the same quantity with more than one scaling value within the
// same expression (like for computing deltas).
continue;
}
AppendCindexes(step_info.node_index, step_info.output_indexes,
&debug_info.cindexes);
if (deriv_matrix != 0) {
Expand Down