code: def _to_tensor(self):
      input = self.model_inputs[0]
      W_weights = self.model_trainable_values[0]
      rank = len(input.zvalue.shape)
  
      if rank == 4:  # NCHW
          nb_filter = W_weights.shape[0]
          nb_row = int(self.onnx_attr["kernel_shape"][0])
          nb_col = int(self.onnx_attr["kernel_shape"][1])
          subSample = (
              [int(i) for i in self.onnx_attr["strides"]]
              if "strides" in self.onnx_attr
              else (1, 1)
          )
          dim_ordering = "th"
          assert "dilations" not in self.onnx_attr or self.onnx_attr[
              "dilations"
          ] == (1, 1), "we only support dilations == (1, 1)"
          assert (
              "group" not in self.onnx_attr
              or self.onnx_attr["group"] == 1
          ), "we only support group == 1"
          bias = True if (len(self._input_list) > 2) else False
  
          border_mode, pads = OnnxHelper.get_padds(self.onnx_attr)
  
          conv = zlayers.Convolution2D(
              nb_filter=nb_filter,
              nb_row=nb_row,
              nb_col=nb_col,
              subsample=subSample,
              dim_ordering=dim_ordering,
              bias=bias,
              border_mode=border_mode,
              pads=pads,
          )
          return conv(input.zvalue)
      else:
          raise Exception("not supported.")
  
file_path: analytics-zoo/pyzoo/zoo/pipeline/api/onnx/mapper/conv.py
imports: from zoo.pipeline.api.onnx.mapper.operator_mapper import OperatorMapper
  from zoo.pipeline.api.onnx.onnx_helper import OnnxHelper
  import zoo.pipeline.api.keras.layers
  import numpy
label_desc: Use image node_id 5 for calling the ConvMapper obj's underlying member method code with example usage: obj._to_tensor() and returns: conv