diff options
author | Roman Grundkiewicz <rgrundki@exseed.ed.ac.uk> | 2018-08-01 18:43:05 +0300 |
---|---|---|
committer | Roman Grundkiewicz <rgrundki@exseed.ed.ac.uk> | 2018-08-01 18:43:05 +0300 |
commit | c73a2cf6fbe58dd7b605c63bf6b5c060c380397f (patch) | |
tree | 31de6d672623f4a7c029f29dbcaeee1bc22ba362 /src/graph/node_operators_unary.h | |
parent | c3807da7374176b1253d27c4d334c2af0fa20633 (diff) |
Fix compiler warnings
Diffstat (limited to 'src/graph/node_operators_unary.h')
-rw-r--r-- | src/graph/node_operators_unary.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/graph/node_operators_unary.h b/src/graph/node_operators_unary.h index 525e0b06..cbeded24 100644 --- a/src/graph/node_operators_unary.h +++ b/src/graph/node_operators_unary.h @@ -227,7 +227,7 @@ struct TanhNodeOp : public NaryNodeOp { child(0)->val(), child(1)->val(), child(2)->val()); - for(int i = 3; i < children_.size(); ++i) + for(size_t i = 3; i < children_.size(); ++i) Element(_1 = _1 + _2, val_, child(i)->val()); Element(_1 = tanh(_1), val_);) }; @@ -237,7 +237,7 @@ struct TanhNodeOp : public NaryNodeOp { NodeOps backwardOps() { using namespace functional; NodeOps ops; - for(int i = 0; i < children_.size(); i++) { + for(size_t i = 0; i < children_.size(); i++) { ops.push_back( NodeOp(Add(_1 * (1.0f - (_2 * _2)), child(i)->grad(), adj_, val_))); } @@ -828,7 +828,7 @@ struct TransposeNodeOp : public UnaryNodeOp { ABORT_IF(shape.size() != axes.size(), "Shape and transpose axes have different number of dimensions"); - for(int i = 0; i < shape.size(); ++i) + for(size_t i = 0; i < shape.size(); ++i) shape.set(i, a->shape()[axes[i]]); return shape; |