Skip to content

avg_pool2d count_include_pad flag not set correctly in TensorRT wrapper #32

@markrogersjr

Description

@markrogersjr

In tensorrt_executor.cc, the AddPooling function does not call nvinfer1::IPoolingLayer::setAverageCountExcludesPadding, which is necessary to set count_include_pad in avg_pool2d. Thus, AverageCountExcludesPadding is true by default. For models such as Inception V3 which using average pooling (for multiple frameworks, including MXNet and PyTorch), AverageCountExcludesPadding should be set to false via nvinfer1::IPoolingLayer::setAverageCountExcludesPadding since count_include_pad is set to true for Inception V3. The result is that Inception V3 produces incorrect outputs for multiple frameworks. @reminisce

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions