Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/marian.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/graph
diff options
context:
space:
mode:
authorFrank Seide <fseide@microsoft.com>2019-07-23 00:53:24 +0300
committerMartin Junczys-Dowmunt <Marcin.JunczysDowmunt@microsoft.com>2019-07-23 00:53:25 +0300
commitddcbe825f0af3f548dd33daedfe340f00c9a1c0c (patch)
tree49ca99d7ee9828ac760887a69d4e71ec3c6459bf /src/graph
parentc341a6c78b905fab1f8a059826458d7392af7d45 (diff)
parent236d153ce4de973a374b827cbc3c4191fec4124a (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.h4
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_))};