Quantcast
Viewing latest article 7
Browse Latest Browse All 534

Invalid argument: model input NHWC/NCHW require 3 dims for visual_changenet_segmentation_tao

Please provide the following information when requesting support.

• Hardware (Other GPU)
• Network Type (visual_changenet_segmentation_tao)

I trained the change net and tested it through tao inference, everything is working correctly. Next, I exported the model to onnx according to this configuration

export:
  results_dir: "${results_dir}/export"
  gpu_id: 1
  checkpoint: "changenet_model_segment_latest.pth"
  onnx_file: "${export.results_dir}/changenet.onnx"
  input_width: 480
  input_height: 480
  batch_size: 1

Next, I switched to triton server version 25 to place my model there. In this container, I get the engine file.

/usr/src/tensorrt/bin/trtexec --onnx=changenet.onnx --fp16 --saveEngine=changenet-fp16_b_1.engine

in the output, I notice a conclusion about the size of the layers, which I will use in the triton config.

[03/11/2025-07:25:14] [I] Input binding for input0 with dimensions 1x3x480x480 is created.
[03/11/2025-07:25:14] [I] Using random values for input input1
[03/11/2025-07:25:14] [I] Input binding for input1 with dimensions 1x3x480x480 is created.
[03/11/2025-07:25:14] [I] Output binding for output0 with dimensions 1x2x30x30 is created.
[03/11/2025-07:25:14] [I] Output binding for output1 with dimensions 1x2x30x30 is created.
[03/11/2025-07:25:14] [I] Output binding for output2 with dimensions 1x2x60x60 is created.
[03/11/2025-07:25:14] [I] Output binding for output3 with dimensions 1x2x120x120 is created.
[03/11/2025-07:25:14] [I] Output binding for output_final with dimensions 1x2x480x480 is created.

I also renamed the .engine format file to the format file.plan
The triton config looks like this

platform: "tensorrt_plan"
input [
  {
    name: "input0"
    data_type: TYPE_FP32
    format: FORMAT_NCHW
    dims: [1, 3, 480, 480 ]
  },
  {
    name: "input1"
    data_type: TYPE_FP32
    format: FORMAT_NCHW
    dims: [1, 3, 480, 480 ]
  }
]
output [
  {
    name: "output_final"
    data_type: TYPE_FP32
    dims: [1, 2, 480, 480 ]
  },
  {
    name: "output0"
    data_type: TYPE_FP32
    dims: [1, 2, 30, 30 ]
  },
  {
    name: "output1"
    data_type: TYPE_FP32
    dims: [1, 2, 30, 30 ]
  },
  {
    name: "output2"
    data_type: TYPE_FP32
    dims: [1, 2, 60, 60]
  },
  {
    name: "output3"
    data_type: TYPE_FP32
    dims: [1, 2, 120, 120 ]
  }
]
dynamic_batching { }

I get an error at startup

"failed to load 'visual_changenet_segmentation_tao' version 1: Invalid argument: model input NHWC/NCHW require 3 dims for visual_changenet_segmentation_tao"
"failed to load 'visual_changenet_segmentation_tao'"

3 posts - 2 participants

Read full topic


Viewing latest article 7
Browse Latest Browse All 534

Trending Articles