Can't load batchNorm layer in TensorRT

Hi,

I am implementing roi pooling layer (see faster rcnn) in tensorRT.

the dim returned by getOutputDimensions is Dims(1000, 256, 7, 7).

something like

Dims getOutputDimensions(int index, const Dims* inputs, int nbInputDims) override
{
  LOG(INFO) << "roi pool getOutputDimensions";
  return Dims4(1000, 256, 7, 7);
}

and there are a fully connected layer which is followed by a batch norm layer.

layer {
  name: "roi_pooling"
  type: "IPlugin"
  bottom: "p2"
  bottom: "p3"
  bottom: "p4"
  bottom: "p5"
  bottom: "all_rois"
  bottom: "all_scores"
  top: "all_roi_pooling"
}
layer {
  name: "new_fc6"
  type: "InnerProduct"
  bottom: "all_roi_pooling"
  top: "new_fc6"
  param {
    name: "fc6_w"
    lr_mult: 1
  }
  param {
    name: "fc6_b"
    lr_mult: 2
  }
  inner_product_param {
    num_output: 1024
  }
}
layer {
  name: "new_fc6/bn"
  type: "BatchNorm"
  bottom: "new_fc6"
  top: "new_fc6"
  param {
    lr_mult: 0
  }
  param {
    lr_mult: 0
  }
  param {
    lr_mult: 0
  }
  batch_norm_param {
    use_global_stats: true
  }
}

However, when parsing the network

tensorRT throws the following errors

ERROR: Parameter check failed at: ../builder/Network.cpp::addScale::120, condition: hasChannelDimension == true
error parsing layer type BatchNorm index 430

any idea?

Hey, did u find the solution to this error, I am facing the same error