diff options
author | Frank Seide <fseide@microsoft.com> | 2019-07-23 00:53:24 +0300 |
---|---|---|
committer | Martin Junczys-Dowmunt <Marcin.JunczysDowmunt@microsoft.com> | 2019-07-23 00:53:25 +0300 |
commit | ddcbe825f0af3f548dd33daedfe340f00c9a1c0c (patch) | |
tree | 49ca99d7ee9828ac760887a69d4e71ec3c6459bf /src/graph | |
parent | c341a6c78b905fab1f8a059826458d7392af7d45 (diff) | |
parent | 236d153ce4de973a374b827cbc3c4191fec4124a (diff) |
Merged PR 8650: fix for decoding with factors for untied embeddings
This fixes Zhongkai's issue when decoding with non-tied embeddings with factors.
Related work items: #98842
Diffstat (limited to 'src/graph')
-rwxr-xr-x[-rw-r--r--] | src/graph/node_operators_unary.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/graph/node_operators_unary.h b/src/graph/node_operators_unary.h index 36273d6f..94200435 100644..100755 --- a/src/graph/node_operators_unary.h +++ b/src/graph/node_operators_unary.h @@ -477,6 +477,10 @@ struct ReduceNodeOp : public UnaryNodeOp { NodeOps backwardOps() override { using namespace functional; +#if 1 // @BUGBUG: This is a workaround for not correctly propagating non-trainable information. @TODO: Do this the right and general way. + if (adj_ == nullptr) + return {}; +#endif switch (opCode_) { case ReduceNodeOpCode::sum: return {NodeOp(Add(_1, child(0)->grad(), adj_))}; |