Fix merge issues (#505)
authorVladimir Plazun/AI Tools Lab /SRR/Engineer/삼성전자 <v.plazun@partner.samsung.com>
Thu, 5 Jul 2018 10:00:21 +0000 (14:00 +0400)
committerSergey Vostokov/AI Tools Lab /SRR/Staff Engineer/삼성전자 <s.vostokov@samsung.com>
Thu, 5 Jul 2018 10:00:21 +0000 (19:00 +0900)
This commit fixes merge issues from #404

Signed-off-by: Vladimir Plazun <v.plazun@partner.samsung.com>
contrib/nnc/libs/backend/interpreter/core/include/interpreter/ops/common.h
contrib/nnc/libs/backend/interpreter/core/src/ops/common.cpp

index 46eab6e..fc44ddb 100644 (file)
@@ -27,7 +27,7 @@ using nncc::core::ADT::tensor::Shape;
 /// \param[in] strides
 /// \param[in] paddings
 void translate(Index &translatedIndex, const Index &sourceIndex, const Index &kernelIndex,
-               const Index &strides, const Index &paddings);
+               const Shape &strides, const Index &paddings);
 
 } // namespace impl
 } // namespace interpreter
index 0f2c174..f004bfd 100644 (file)
@@ -1,3 +1,5 @@
+#include <cassert>
+
 #include "interpreter/ops/common.h"
 
 namespace nncc
@@ -16,7 +18,7 @@ void translate(Index &translatedIndex, const Index &sourceIndex, const Index &ke
 {
   assert(translatedIndex.rank() == sourceIndex.rank());
 
-  for (uint32_t d = 0; d < outputIndex.rank(); ++d)
+  for (uint32_t d = 0; d < translatedIndex.rank(); ++d)
   {
     translatedIndex.at(d) = sourceIndex.at(d) * strides.dim(d) + kernelIndex.at(d) - paddings.at(d);
   }