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
diff options
context:
space:
mode:
authorMarcin Junczys-Dowmunt <junczys@amu.edu.pl>2017-02-15 17:52:26 +0300
committerMarcin Junczys-Dowmunt <junczys@amu.edu.pl>2017-02-15 17:52:26 +0300
commita3e925119b630467260652c8214d4886d9b6a9a9 (patch)
treedb43f94c7b3ba52adbb064e5b18bd0cf504d407a /src/graph/node_operators_unary.h
parent87b0deaf4184dc778e6942616be9b2dad0b5e164 (diff)
small changes in mean node
Diffstat (limited to 'src/graph/node_operators_unary.h')
-rw-r--r--src/graph/node_operators_unary.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/graph/node_operators_unary.h b/src/graph/node_operators_unary.h
index 80ee0801..23274858 100644
--- a/src/graph/node_operators_unary.h
+++ b/src/graph/node_operators_unary.h
@@ -329,7 +329,7 @@ struct MeanNodeOp : public UnaryNodeOp {
float scale = 1.f / left;
return {
- NodeOp(Reduce(_1 * scale, val_, children_[0]->val()))
+ NodeOp(Reduce(_1, val_, children_[0]->val(), scale))
};
}
@@ -338,7 +338,7 @@ struct MeanNodeOp : public UnaryNodeOp {
float scale = 1.f / left;
return {
- NodeOp(Add(_1 * scale, children_[0]->grad(), adj_))
+ NodeOp(Add(_1, children_[0]->grad(), adj_, scale))
};
}