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:
authorRoman Grundkiewicz <rgrundki@exseed.ed.ac.uk>2017-10-28 20:02:26 +0300
committerRoman Grundkiewicz <rgrundki@exseed.ed.ac.uk>2017-10-28 20:02:26 +0300
commitc7e99fc4a503c29a8709269611cefdb9f86ff7c7 (patch)
treef69a3215c00762487e6a58331168dc91c6e25515 /src/graph
parent7f9cfa454891cd61e4a8a81fa9df8e4f370aea52 (diff)
Autoformat
Diffstat (limited to 'src/graph')
-rw-r--r--src/graph/node_operators_binary.h26
-rw-r--r--src/graph/node_operators_unary.h7
2 files changed, 23 insertions, 10 deletions
diff --git a/src/graph/node_operators_binary.h b/src/graph/node_operators_binary.h
index 4f84f631..3eaace1f 100644
--- a/src/graph/node_operators_binary.h
+++ b/src/graph/node_operators_binary.h
@@ -41,10 +41,15 @@ private:
public:
template <typename... Args>
- DotNodeOp(
- Expr a, Expr b, bool transA, bool transB, float scalar, Args... args)
- : NaryNodeOp(
- {a, b}, keywords::shape = newShape(a, b, transA, transB), args...),
+ DotNodeOp(Expr a,
+ Expr b,
+ bool transA,
+ bool transB,
+ float scalar,
+ Args... args)
+ : NaryNodeOp({a, b},
+ keywords::shape = newShape(a, b, transA, transB),
+ args...),
transA_(transA),
transB_(transB),
scalar_(scalar) {}
@@ -182,10 +187,15 @@ private:
public:
template <typename... Args>
- DotBatchedNodeOp(
- Expr a, Expr b, bool transA, bool transB, float scalar, Args... args)
- : NaryNodeOp(
- {a, b}, keywords::shape = newShape(a, b, transA, transB), args...),
+ DotBatchedNodeOp(Expr a,
+ Expr b,
+ bool transA,
+ bool transB,
+ float scalar,
+ Args... args)
+ : NaryNodeOp({a, b},
+ keywords::shape = newShape(a, b, transA, transB),
+ args...),
transA_(transA),
transB_(transB),
scalar_(scalar) {}
diff --git a/src/graph/node_operators_unary.h b/src/graph/node_operators_unary.h
index f42b7eed..7455d7f5 100644
--- a/src/graph/node_operators_unary.h
+++ b/src/graph/node_operators_unary.h
@@ -237,8 +237,11 @@ struct SwishNodeOp : public UnaryNodeOp {
}
NodeOps backwardOps() {
- return {NodeOp(
- Add(_1 * (_3 + Sigma(_2) * (1.f - _3)), child(0)->grad(), adj_, child(0)->val(), val_))};
+ return {NodeOp(Add(_1 * (_3 + Sigma(_2) * (1.f - _3)),
+ child(0)->grad(),
+ adj_,
+ child(0)->val(),
+ val_))};
}
const std::string type() { return "swish"; }