From 966fb9e9e835f0390bd11c268cf72d00fcea9272 Mon Sep 17 00:00:00 2001 From: Pedro Larroy Date: Wed, 17 Apr 2019 01:08:51 +0000 Subject: [PATCH] lint --- include/mxnet/ndarray.h | 3 +-- src/imperative/cached_op.cc | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/mxnet/ndarray.h b/include/mxnet/ndarray.h index 4159d9119281..e5e20f263d10 100644 --- a/include/mxnet/ndarray.h +++ b/include/mxnet/ndarray.h @@ -83,8 +83,7 @@ class NDArray { public: /*! \brief default constructor */ NDArray() - : entry_(nullptr) - { + : entry_(nullptr) { } /*! * \brief constructs a new dynamic NDArray diff --git a/src/imperative/cached_op.cc b/src/imperative/cached_op.cc index 0d4a4f7577b3..43e35483cd86 100644 --- a/src/imperative/cached_op.cc +++ b/src/imperative/cached_op.cc @@ -159,11 +159,9 @@ CachedOp::CachedOp( // construct backward graph { - //ograd_entries_.resize(fwd_graph_.outputs.size()); ograd_entries_.reserve(fwd_graph_.outputs.size()); - for (size_t i = 0; i < fwd_graph_.outputs.size(); ++i) { + for (size_t i = 0; i < fwd_graph_.outputs.size(); ++i) ograd_entries_.emplace_back(Node::Create()); - } std::vector xs; const IndexedGraph& indexed_graph = fwd_graph_.indexed_graph();