docstr: Run the model with the input and return the result.
docstr_tok: ["Run","the","model","with","the","input","and","return","the","result","."]
code: def transform(self, X):
      """Run the model with the input and return the result."""
      if not self.input_names:
          raw_names = list(X.columns)
          onnx_names = [
              n.replace("-", "_").replace(".", "_") for n in raw_names
          ]
          onnx_to_raw = {o: r for o, r in zip(onnx_names, raw_names)}
          self.input_names = [
              onnx_to_raw[oname] for oname in self.onnx_input_names
          ]
  
      input_dict = {}
      input_arr = X[self.input_names].to_numpy().astype(np.float32)
      input_size = input_arr.shape[0]
      inputs = []
      if input_size > self.batch_size:
          indices = list(
              np.arange(self.batch_size, input_size, self.batch_size)
          ) + [input_size]
          inputs = np.split(input_arr, indices)
      else:
          inputs = [input_arr]
      outputs = []
      for input_arr in inputs:
          input_size = input_arr.shape[0]
          if input_size < self.batch_size:
              # padding
              pad_size = self.batch_size - input_size
              pad_shape = list(input_arr.shape)
              pad_shape[0] = pad_size
              pad_arr = np.zeros(
                  shape=tuple(pad_shape), dtype=np.float32
              )
              input_arr = np.concatenate([input_arr, pad_arr])
          for idx, name in enumerate(self.onnx_input_names):
              input_dict[name] = input_arr[:, idx].reshape(
                  self.batch_size, 1
              )
          label_name = self.sess.get_outputs()[0].name
          output_arr = self.sess.run([label_name], input_dict)[0]
          if input_size < self.batch_size:
              # remove padding
              output_arr = output_arr[:input_size, :]
          outputs.append(output_arr)
      outputs = np.concatenate(outputs)
      return outputs
  
imports: import os
  import numpy
label_desc: Use image node_id 2 for calling the TabularNeuralNetTorchOnnxTransformer obj's underlying member method code with example usage: obj.transform(X) and returns: outputs