size_t on 32bit OS (#1721)
authorDmitry Kurtaev <dmitry.kurtaev+github@gmail.com>
Wed, 12 Aug 2020 03:56:19 +0000 (06:56 +0300)
committerGitHub <noreply@github.com>
Wed, 12 Aug 2020 03:56:19 +0000 (06:56 +0300)
inference-engine/src/transformations/src/transformations/convert_opset1_to_legacy/conv_bias_fusion.cpp
inference-engine/src/transformations/src/transformations/convert_opset1_to_legacy/convert_convolutions.cpp

index 4b4e708..63bd3ea 100644 (file)
@@ -36,7 +36,7 @@ ngraph::graph_rewrite_callback get_callback() {
             return false;
         }
 
-        const auto channel_dim = output_pshape[1].get_length();
+        const int64_t channel_dim = output_pshape[1].get_length();
 
         size_t constant_size = std::accumulate(constant_shape.begin(), constant_shape.end(), 1, std::multiplies<size_t>());
         if (constant_size != channel_dim) {
index fda158c..d9b401b 100644 (file)
@@ -54,7 +54,7 @@ ngraph::pass::ConvertGroupConvolution::ConvertGroupConvolution() {
 
         // Merge weights layout GOIYX to (G*O)IYX
         auto shape = gconv->input_value(1).get_shape();
-        std::vector<int64_t> reshape_shape{-1};
+        std::vector<int64_t> reshape_shape{static_cast<int64_t>(shape[0] * shape[1])};
         for (size_t i = 2; i < shape.size(); ++i) {
             reshape_shape.push_back(shape[i]);
         }
@@ -127,7 +127,8 @@ ngraph::pass::ConvertGroupDeconvolution::ConvertGroupDeconvolution() {
         // Merge weights layout GIOYX to I(G*O)YX
         auto input_shape = gconv->input_value(0).get_shape();
         auto weights_shape = gconv->input_value(1).get_shape();
-        std::vector<size_t> reshape_shape{weights_shape[1], weights_shape[2] * group};
+        std::vector<int64_t> reshape_shape{static_cast<int64_t>(weights_shape[1]),
+                                           static_cast<int64_t>(weights_shape[2] * group)};
         for (size_t i = 3; i < weights_shape.size(); ++i) {
             reshape_shape.push_back(weights_shape[i]);
         }