Importing caffe's PriorBox into TensorRT

Viewed 374

We have a Caffe model that contains:

layer {
    name: "foo"
    type: "PriorBox"
    prior_box_param { # ERROR HERE
        # whatever
    }
    # etc
}

Now, following the code in sampleMNIST I try to import my model into TensorRT but get an error:

Error parsing text-format ditcaffe.NetParameter: 1000:19 ("ERROR HERE" location):
   Message type "ditcaffe.LayerParameter" has no field named "prior_box_param".

Searching around, this is a known issue and there is even a TensorRT class nvinfer1::plugin::PriorBoxParameters that suggests it should be able to handle this layer, but there is little or documentation on how to proceed. I read one suggestion about splitting the model, but there are four instances of this node in my model, and more importantly, there is no information about what code should be in a custom node.

How should I handle this with minimal impact on the existing model that has been designed and trained by a third-party, so I cannot drastically alter either the model or the weights.

0 Answers
Related