[mir_caffe] Do not set names of operations (#6814)
authorСергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 <s.barannikov@samsung.com>
Mon, 26 Aug 2019 18:53:27 +0000 (03:53 +0900)
committerAlexander Efimov/AI Tools Lab/./Samsung Electronics <a.efimov@samsung.com>
Mon, 26 Aug 2019 18:53:27 +0000 (21:53 +0300)
Remove useless setting of operation names.

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
compiler/mir-caffe-importer/caffe_op_creator.cpp
compiler/mir-caffe-importer/caffe_op_creator.h

index 02db7ec..60e7384 100644 (file)
@@ -116,14 +116,14 @@ using namespace mir;
 mir::Operation::Output *CaffeOpCreator::convertCaffeToMIR(mir::Operation::Output *arg)
 {
   // NCHW -> NHWC
-  auto transpose = createOp<ops::TransposeOp>("", arg, std::vector<std::size_t>{0, 2, 3, 1});
+  auto transpose = createOp<ops::TransposeOp>(arg, std::vector<std::size_t>{0, 2, 3, 1});
   return transpose->getOutput(0);
 }
 
 mir::Operation::Output *CaffeOpCreator::convertMIRToCaffe(mir::Operation::Output *arg)
 {
   // NHWC -> NCHW
-  auto transpose = createOp<ops::TransposeOp>("", arg, std::vector<std::size_t>{0, 3, 1, 2});
+  auto transpose = createOp<ops::TransposeOp>(arg, std::vector<std::size_t>{0, 3, 1, 2});
   return transpose->getOutput(0);
 }
 
@@ -144,7 +144,7 @@ std::vector<mir::Operation::Output *> CaffeOpCreator::createSplit(mir::Operation
   std::vector<mir::Operation::Output *> outputs(num_parts);
   for (int32_t i = 0; i < num_parts; ++i)
   {
-    outputs[i] = createOp<ops::SliceOp>("", arg, starts, sizes)->getOutput(0);
+    outputs[i] = createOp<ops::SliceOp>(arg, starts, sizes)->getOutput(0);
     starts.dim(axis) += part_size;
   }
 
@@ -175,9 +175,9 @@ mir::Operation::Output *CaffeOpCreator::createFullyConnected(mir::Operation::Out
   for (int32_t i = axis; i < input_shape.rank(); ++i)
     inner_size *= input_shape.dim(i);
 
-  auto flatten = createOp<ops::ReshapeOp>("", input, Shape{outer_size, inner_size})->getOutput(0);
-  auto fc = createOp<ops::FullyConnectedOp>("", flatten, weights)->getOutput(0);
-  return createOp<ops::ReshapeOp>("", fc, result_shape)->getOutput(0);
+  auto flatten = createOp<ops::ReshapeOp>(input, Shape{outer_size, inner_size})->getOutput(0);
+  auto fc = createOp<ops::FullyConnectedOp>(flatten, weights)->getOutput(0);
+  return createOp<ops::ReshapeOp>(fc, result_shape)->getOutput(0);
 }
 
 TensorVariant CaffeOpCreator::convertBlob(const BlobProto &blob)
@@ -219,7 +219,8 @@ std::vector<mir::Operation::Output *> CaffeOpCreator::convertInput(const LayerPa
     const auto &blob_name = layer.top(i);
     const auto &blob_shape = params.shape(num_shapes == 1 ? 0 : i);
     const mir::Shape shape = convertBlobShape(blob_shape);
-    auto variable = createOp<ops::InputOp>(blob_name, shape);
+    auto variable = createOp<ops::InputOp>(shape);
+    variable->setName(blob_name);
     outputs.push_back(variable->getOutput(0));
   }
 
@@ -321,9 +322,9 @@ CaffeOpCreator::convertConvolution(const caffe::LayerParameter &layer,
     // This is depthwise convolution
     // TODO handle properly kernel with layer multiplier
     auto transposed_tensor = transposeTensor<0, 1, 3, 2>(kernel_weights);
-    auto kernel = createOp<ops::ConstantOp>("", transposed_tensor)->getOutput(0);
-    result = createOp<ops::DepthwiseConv2DOp>(layer.name(), convertCaffeToMIR(inputs[0]), kernel,
-                                              strides, padding, padding)
+    auto kernel = createOp<ops::ConstantOp>(transposed_tensor)->getOutput(0);
+    result = createOp<ops::DepthwiseConv2DOp>(convertCaffeToMIR(inputs[0]), kernel, strides,
+                                              padding, padding)
                  ->getOutput(0);
   }
   else
@@ -334,17 +335,17 @@ CaffeOpCreator::convertConvolution(const caffe::LayerParameter &layer,
       kernel_weights = fixGroupedKernel(params.group(), kernel_weights);
     }
     kernel_weights = transposeTensor<3, 0, 1, 2>(kernel_weights);
-    auto kernel = createOp<ops::ConstantOp>("", kernel_weights)->getOutput(0);
-    result = createOp<ops::Conv2DOp>(layer.name(), convertCaffeToMIR(inputs[0]), kernel, strides,
-                                     padding, padding)
-                 ->getOutput(0);
+    auto kernel = createOp<ops::ConstantOp>(kernel_weights)->getOutput(0);
+    result =
+        createOp<ops::Conv2DOp>(convertCaffeToMIR(inputs[0]), kernel, strides, padding, padding)
+            ->getOutput(0);
   }
 
   // Add the bias, if any.
   if (params.bias_term())
   {
-    auto bias = createOp<ops::ConstantOp>("", convertBlob(layer.blobs(1)))->getOutput(0);
-    result = createOp<ops::AddOp>(layer.name() + ".bias", result, bias)->getOutput(0);
+    auto bias = createOp<ops::ConstantOp>(convertBlob(layer.blobs(1)))->getOutput(0);
+    result = createOp<ops::AddOp>(result, bias)->getOutput(0);
   }
 
   return {convertMIRToCaffe(result)};
@@ -368,16 +369,15 @@ CaffeOpCreator::convertDeconvolution(const caffe::LayerParameter &layer,
     // first we need to convert kernel of grouped convolution to appropriate ordinary kernel
     kernel_weights = fixGroupedKernel(opts.group(), kernel_weights);
   }
-  auto kernel = createOp<ops::ConstantOp>("", kernel_weights)->getOutput(0);
-  auto result = createOp<ops::DeConv2DOp>(layer.name(), convertCaffeToMIR(inputs[0]), kernel,
-                                          strides, padding)
+  auto kernel = createOp<ops::ConstantOp>(kernel_weights)->getOutput(0);
+  auto result = createOp<ops::DeConv2DOp>(convertCaffeToMIR(inputs[0]), kernel, strides, padding)
                     ->getOutput(0);
 
   // bias_term is optional (so might not be present) and defaults to true
   if (opts.bias_term())
   {
-    auto bias = createOp<ops::ConstantOp>("", convertBlob(layer.blobs(1)))->getOutput(0);
-    result = createOp<ops::AddOp>(layer.name() + ".bias", result, bias)->getOutput(0);
+    auto bias = createOp<ops::ConstantOp>(convertBlob(layer.blobs(1)))->getOutput(0);
+    result = createOp<ops::AddOp>(result, bias)->getOutput(0);
   }
 
   return {convertMIRToCaffe(result)};
@@ -393,14 +393,14 @@ CaffeOpCreator::convertInnerProduct(const LayerParameter &layer,
   if (!params.transpose())
     weights_tensor = transposeTensor<1, 0>(weights_tensor);
 
-  auto weights = createOp<ops::ConstantOp>("", weights_tensor)->getOutput(0);
+  auto weights = createOp<ops::ConstantOp>(weights_tensor)->getOutput(0);
   auto result = createFullyConnected(inputs[0], weights, params.axis());
 
   // Add the bias, if any.
   if (params.bias_term())
   {
-    auto bias = createOp<ops::ConstantOp>("", convertBlob(layer.blobs(1)))->getOutput(0);
-    result = createOp<ops::AddOp>(layer.name() + ".bias", result, bias)->getOutput(0);
+    auto bias = createOp<ops::ConstantOp>(convertBlob(layer.blobs(1)))->getOutput(0);
+    result = createOp<ops::AddOp>(result, bias)->getOutput(0);
   }
 
   return {result};
@@ -411,7 +411,7 @@ CaffeOpCreator::convertConcat(const caffe::LayerParameter &layer,
                               const std::vector<mir::Operation::Output *> &inputs)
 {
   const auto &params = layer.concat_param();
-  auto concat = createOp<ops::ConcatOp>(layer.name(), inputs, params.axis());
+  auto concat = createOp<ops::ConcatOp>(inputs, params.axis());
   return {concat->getOutput(0)};
 }
 
@@ -518,9 +518,8 @@ CaffeOpCreator::convertPooling(const caffe::LayerParameter &layer,
       assert(false);
   }
 
-  auto pooling =
-      createOp<ops::PoolOp>(layer.name(), convertCaffeToMIR(inputs[0]), pool_type, window_shape,
-                            strides, padding_before, padding_after, border_type);
+  auto pooling = createOp<ops::PoolOp>(convertCaffeToMIR(inputs[0]), pool_type, window_shape,
+                                       strides, padding_before, padding_after, border_type);
   return {convertMIRToCaffe(pooling->getOutput(0))};
 }
 
@@ -538,15 +537,14 @@ CaffeOpCreator::convertSoftmax(const caffe::LayerParameter &layer,
     if (params.axis() != 1)
       throw std::runtime_error("Softmax: unsupported axis");
     int32_t axis = 3;
-    auto input = createOp<ops::TransposeOp>(layer.name() + ".trans1", inputs[0],
-                                            std::vector<std::size_t>{0, 2, 3, 1});
-    auto softmax = createOp<ops::SoftmaxOp>(layer.name(), input->getOutput(0), axis);
-    auto result = createOp<ops::TransposeOp>(layer.name() + ".trans2", softmax->getOutput(0),
-                                             std::vector<std::size_t>{0, 3, 1, 2});
+    auto input = createOp<ops::TransposeOp>(inputs[0], std::vector<std::size_t>{0, 2, 3, 1});
+    auto softmax = createOp<ops::SoftmaxOp>(input->getOutput(0), axis);
+    auto result =
+        createOp<ops::TransposeOp>(softmax->getOutput(0), std::vector<std::size_t>{0, 3, 1, 2});
     return {result->getOutput(0)};
   }
 
-  auto softmax = createOp<ops::SoftmaxOp>(layer.name(), inputs[0], params.axis());
+  auto softmax = createOp<ops::SoftmaxOp>(inputs[0], params.axis());
   return {softmax->getOutput(0)};
 }
 
@@ -578,7 +576,7 @@ CaffeOpCreator::convertReshape(const caffe::LayerParameter &layer,
 {
   auto &opts = layer.reshape_param();
   const mir::Shape new_shape = convertBlobShape(opts.shape());
-  auto reshape = createOp<ops::ReshapeOp>(layer.name(), inputs[0], new_shape);
+  auto reshape = createOp<ops::ReshapeOp>(inputs[0], new_shape);
   return {reshape->getOutput(0)};
 }
 
@@ -590,11 +588,11 @@ CaffeOpCreator::convertReLU(const caffe::LayerParameter &layer,
   if (layer.relu_param().has_negative_slope())
   {
     float alpha = layer.relu_param().negative_slope();
-    relu = createOp<ops::LeakyReluOp>(layer.name(), inputs[0], alpha);
+    relu = createOp<ops::LeakyReluOp>(inputs[0], alpha);
   }
   else
   {
-    relu = createOp<ops::ReluOp>(layer.name(), inputs[0]);
+    relu = createOp<ops::ReluOp>(inputs[0]);
   }
 
   return {relu->getOutput(0)};
@@ -605,15 +603,14 @@ CaffeOpCreator::convertScale(const caffe::LayerParameter &layer,
                              const std::vector<mir::Operation::Output *> &inputs)
 {
   const auto &params = layer.scale_param();
-  auto scale = createOp<ops::ConstantOp>("", convertBlob(layer.blobs(0)))->getOutput(0);
-  auto result =
-      createOp<ops::MulOp>(layer.name(), convertCaffeToMIR(inputs[0]), scale)->getOutput(0);
+  auto scale = createOp<ops::ConstantOp>(convertBlob(layer.blobs(0)))->getOutput(0);
+  auto result = createOp<ops::MulOp>(convertCaffeToMIR(inputs[0]), scale)->getOutput(0);
 
   // Add the bias, if any.
   if (params.bias_term())
   {
-    auto bias = createOp<ops::ConstantOp>("", convertBlob(layer.blobs(1)))->getOutput(0);
-    result = createOp<ops::AddOp>(layer.name() + ".bias", result, bias)->getOutput(0);
+    auto bias = createOp<ops::ConstantOp>(convertBlob(layer.blobs(1)))->getOutput(0);
+    result = createOp<ops::AddOp>(result, bias)->getOutput(0);
   }
 
   return {convertMIRToCaffe(result)};
@@ -652,18 +649,18 @@ CaffeOpCreator::convertBatchNorm(const caffe::LayerParameter &layer,
   Tensor<float> mean_accessor(mean_tensor);
   for (const auto &idx : ShapeRange(mean_accessor.getShape()))
     mean_accessor.at(idx) *= -scale_factor;
-  auto c1 = createOp<ops::ConstantOp>("", mean_tensor)->getOutput(0);
+  auto c1 = createOp<ops::ConstantOp>(mean_tensor)->getOutput(0);
 
   // C2 = 1 / sqrt(var / scale_factor + epsilon)
   Tensor<float> var_accessor(var_tensor);
   for (const auto &idx : ShapeRange(var_accessor.getShape()))
     var_accessor.at(idx) = 1.0f / std::sqrt(var_accessor.at(idx) * scale_factor + eps);
-  auto c2 = createOp<ops::ConstantOp>("", var_tensor)->getOutput(0);
+  auto c2 = createOp<ops::ConstantOp>(var_tensor)->getOutput(0);
 
   // Y = (X + C1) * C2
   input = convertCaffeToMIR(input);
-  auto result = createOp<ops::AddOp>("", input, c1)->getOutput(0);
-  result = createOp<ops::MulOp>("", result, c2)->getOutput(0);
+  auto result = createOp<ops::AddOp>(input, c1)->getOutput(0);
+  result = createOp<ops::MulOp>(result, c2)->getOutput(0);
   return {convertMIRToCaffe(result)};
 }
 
@@ -680,7 +677,7 @@ CaffeOpCreator::convertELU(const caffe::LayerParameter &layer,
                            const std::vector<mir::Operation::Output *> &inputs)
 {
   auto &opts = layer.elu_param();
-  auto elu = createOp<ops::EluOp>(layer.name(), inputs[0], opts.alpha());
+  auto elu = createOp<ops::EluOp>(inputs[0], opts.alpha());
   return {elu->getOutput(0)};
 }
 
@@ -689,15 +686,14 @@ CaffeOpCreator::convertEmbed(const caffe::LayerParameter &layer,
                              const std::vector<mir::Operation::Output *> &inputs)
 {
   const auto &params = layer.embed_param();
-  auto data = createOp<ops::ConstantOp>(layer.name() + ".weights", convertBlob(layer.blobs(0)));
-  auto result =
-      createOp<ops::GatherOp>(layer.name(), data->getOutput(0), inputs[0], 0)->getOutput(0);
+  auto data = createOp<ops::ConstantOp>(convertBlob(layer.blobs(0)));
+  auto result = createOp<ops::GatherOp>(data->getOutput(0), inputs[0], 0)->getOutput(0);
 
   // Add the bias, if any.
   if (params.bias_term())
   {
-    auto bias = createOp<ops::ConstantOp>("", convertBlob(layer.blobs(1)))->getOutput(0);
-    result = createOp<ops::AddOp>(layer.name() + ".bias", result, bias)->getOutput(0);
+    auto bias = createOp<ops::ConstantOp>(convertBlob(layer.blobs(1)))->getOutput(0);
+    result = createOp<ops::AddOp>(result, bias)->getOutput(0);
   }
 
   return {result};
@@ -707,7 +703,7 @@ std::vector<mir::Operation::Output *>
 CaffeOpCreator::convertSigmoid(const caffe::LayerParameter &layer,
                                const std::vector<mir::Operation::Output *> &inputs)
 {
-  auto result = createOp<ops::SigmoidOp>(layer.name(), inputs[0]);
+  auto result = createOp<ops::SigmoidOp>(inputs[0]);
   return {result->getOutput(0)};
 }
 
@@ -715,7 +711,7 @@ std::vector<mir::Operation::Output *>
 CaffeOpCreator::convertTanH(const caffe::LayerParameter &layer,
                             const std::vector<mir::Operation::Output *> &inputs)
 {
-  auto tanh = createOp<ops::TanhOp>(layer.name(), inputs[0]);
+  auto tanh = createOp<ops::TanhOp>(inputs[0]);
   return {tanh->getOutput(0)};
 }
 
@@ -730,10 +726,10 @@ CaffeOpCreator::convertEltwise(const caffe::LayerParameter &layer,
   {
     case EltwiseParameter_EltwiseOp_PROD:
     {
-      result = createOp<ops::MulOp>("", inputs[0], inputs[1])->getOutput(0);
+      result = createOp<ops::MulOp>(inputs[0], inputs[1])->getOutput(0);
       for (int i = 2; i < layer.bottom_size(); ++i)
       {
-        result = createOp<ops::MulOp>("", result, inputs[i])->getOutput(0);
+        result = createOp<ops::MulOp>(result, inputs[i])->getOutput(0);
       }
       break;
     }
@@ -749,24 +745,24 @@ CaffeOpCreator::convertEltwise(const caffe::LayerParameter &layer,
           {
             const float coeff_val = params.coeff(i);
             TensorVariant coeff_tensor(mir::DataType::FLOAT32, Shape{}, &coeff_val);
-            auto coeff_const = createOp<ops::ConstantOp>("", coeff_tensor)->getOutput(0);
-            scaled_inputs[i] = createOp<ops::MulOp>("", coeff_const, inputs[i])->getOutput(0);
+            auto coeff_const = createOp<ops::ConstantOp>(coeff_tensor)->getOutput(0);
+            scaled_inputs[i] = createOp<ops::MulOp>(coeff_const, inputs[i])->getOutput(0);
           }
         }
       }
-      result = createOp<ops::AddOp>("", scaled_inputs[0], scaled_inputs[1])->getOutput(0);
+      result = createOp<ops::AddOp>(scaled_inputs[0], scaled_inputs[1])->getOutput(0);
       for (int i = 2; i < layer.bottom_size(); ++i)
       {
-        result = createOp<ops::AddOp>("", result, scaled_inputs[i])->getOutput(0);
+        result = createOp<ops::AddOp>(result, scaled_inputs[i])->getOutput(0);
       }
       break;
     }
     case EltwiseParameter_EltwiseOp_MAX:
     {
-      result = createOp<ops::MaxOp>("", inputs[0], inputs[1])->getOutput(0);
+      result = createOp<ops::MaxOp>(inputs[0], inputs[1])->getOutput(0);
       for (int i = 2; i < layer.bottom_size(); ++i)
       {
-        result = createOp<ops::MaxOp>("", result, inputs[i])->getOutput(0);
+        result = createOp<ops::MaxOp>(result, inputs[i])->getOutput(0);
       }
       break;
     }
@@ -872,20 +868,20 @@ CaffeOpCreator::convertLSTM(const caffe::LayerParameter &layer,
   auto xw_tensor = transposeTensor<1, 0>(convertBlob(layer.blobs(0)));
   auto xb_tensor = convertBlob(layer.blobs(1));
   auto hw_tensor = transposeTensor<1, 0>(convertBlob(layer.blobs(2)));
-  auto xw = createOp<ops::ConstantOp>("", xw_tensor)->getOutput(0);
-  auto xb = createOp<ops::ConstantOp>("", xb_tensor)->getOutput(0);
-  auto hw = createOp<ops::ConstantOp>("", hw_tensor)->getOutput(0);
+  auto xw = createOp<ops::ConstantOp>(xw_tensor)->getOutput(0);
+  auto xb = createOp<ops::ConstantOp>(xb_tensor)->getOutput(0);
+  auto hw = createOp<ops::ConstantOp>(hw_tensor)->getOutput(0);
 
   // Add a dummy dimension so that element-wise operations perform properly.
-  cont = createOp<ops::ReshapeOp>("", cont, Shape{seq_length, batch_size, 1})->getOutput(0);
+  cont = createOp<ops::ReshapeOp>(cont, Shape{seq_length, batch_size, 1})->getOutput(0);
 
   // Initialize cell and hidden states with zeros.
   auto zero_tensor = createZeroedTensor(Shape{1, batch_size, hidden_size});
-  auto c_t = createOp<ops::ConstantOp>("", zero_tensor)->getOutput(0);
-  auto h_t = createOp<ops::ConstantOp>("", zero_tensor)->getOutput(0);
+  auto c_t = createOp<ops::ConstantOp>(zero_tensor)->getOutput(0);
+  auto h_t = createOp<ops::ConstantOp>(zero_tensor)->getOutput(0);
 
   auto x_xw = createFullyConnected(x, xw, 2);
-  auto x_xw_b = createOp<ops::AddOp>("", x_xw, xb)->getOutput(0);
+  auto x_xw_b = createOp<ops::AddOp>(x_xw, xb)->getOutput(0);
 
   // Split input and continuation tensors into seq_length slices.
   std::vector<mir::Operation::Output *> x_xw_b_slices = createSplit(x_xw_b, seq_length, 0);
@@ -894,28 +890,28 @@ CaffeOpCreator::convertLSTM(const caffe::LayerParameter &layer,
 
   for (int32_t t = 0; t < seq_length; t++)
   {
-    auto c_cont_t = createOp<ops::MulOp>("", c_t, cont_slices[t])->getOutput(0);
-    auto h_cont_t = createOp<ops::MulOp>("", h_t, cont_slices[t])->getOutput(0);
+    auto c_cont_t = createOp<ops::MulOp>(c_t, cont_slices[t])->getOutput(0);
+    auto h_cont_t = createOp<ops::MulOp>(h_t, cont_slices[t])->getOutput(0);
 
     auto x_xw_b_t = x_xw_b_slices[t];
     auto h_hw_t = createFullyConnected(h_cont_t, hw, 2);
-    auto activation_inputs_concat = createOp<ops::AddOp>("", x_xw_b_t, h_hw_t)->getOutput(0);
+    auto activation_inputs_concat = createOp<ops::AddOp>(x_xw_b_t, h_hw_t)->getOutput(0);
     auto activation_inputs = createSplit(activation_inputs_concat, 4, 2);
 
-    auto i_t = createOp<ops::SigmoidOp>("", activation_inputs[0])->getOutput(0);
-    auto f_t = createOp<ops::SigmoidOp>("", activation_inputs[1])->getOutput(0);
-    auto o_t = createOp<ops::SigmoidOp>("", activation_inputs[2])->getOutput(0);
-    auto g_t = createOp<ops::TanhOp>("", activation_inputs[3])->getOutput(0);
+    auto i_t = createOp<ops::SigmoidOp>(activation_inputs[0])->getOutput(0);
+    auto f_t = createOp<ops::SigmoidOp>(activation_inputs[1])->getOutput(0);
+    auto o_t = createOp<ops::SigmoidOp>(activation_inputs[2])->getOutput(0);
+    auto g_t = createOp<ops::TanhOp>(activation_inputs[3])->getOutput(0);
 
-    c_t = createOp<ops::AddOp>("", createOp<ops::MulOp>("", c_cont_t, f_t)->getOutput(0),
-                               createOp<ops::MulOp>("", i_t, g_t)->getOutput(0))
+    c_t = createOp<ops::AddOp>(createOp<ops::MulOp>(c_cont_t, f_t)->getOutput(0),
+                               createOp<ops::MulOp>(i_t, g_t)->getOutput(0))
               ->getOutput(0);
-    h_t = createOp<ops::MulOp>("", createOp<ops::TanhOp>("", c_t)->getOutput(0), o_t)->getOutput(0);
+    h_t = createOp<ops::MulOp>(createOp<ops::TanhOp>(c_t)->getOutput(0), o_t)->getOutput(0);
 
     h_slices[t] = h_t;
   }
 
-  return {createOp<ops::ConcatOp>("", h_slices, 0)->getOutput(0)};
+  return {createOp<ops::ConcatOp>(h_slices, 0)->getOutput(0)};
 }
 
 } // namespace mir_caffe
index 7a3abce..f83c372 100644 (file)
@@ -139,14 +139,13 @@ private:
 
   TensorVariant convertBlob(const caffe::BlobProto &blob);
 
-  template <typename OpType, typename... Types>
-  mir::Operation *createOp(const std::string &name, Types &&... args);
+  template <typename OpType, typename... Types> mir::Operation *createOp(Types &&... args);
 };
 
 template <typename OpType, typename... Types>
-mir::Operation *CaffeOpCreator::createOp(const std::string &name, Types &&... args)
+mir::Operation *CaffeOpCreator::createOp(Types &&... args)
 {
-  return _graph->create<OpType>(name, std::forward<Types>(args)...);
+  return _graph->create<OpType>("", std::forward<Types>(args)...);
 }
 
 } // namespace mir_caffe