From c73a2cf6fbe58dd7b605c63bf6b5c060c380397f Mon Sep 17 00:00:00 2001 From: Roman Grundkiewicz Date: Wed, 1 Aug 2018 16:43:05 +0100 Subject: Fix compiler warnings --- src/graph/node_operators_unary.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/graph/node_operators_unary.h') 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; -- cgit v1.2.3