Skip to content

tensorRT8.x NCHW format #2912

@alicera

Description

@alicera

Description

if using the tensorRT engine, the network input should be NCHW now ?

the cv::Mat &input should be NCHW?

    const cv::Mat &input
    void *data = malloc(Len);
    memcpy(data, input.ptr<float>(0), Len);

    cudaMemcpyAsync(buffers[0], data, \
    inputLen, cudaMemcpyHostToDevice, stream);

    // infernece
    m_context->enqueueV2(buffers, stream, nullptr);

Environment

TensorRT Version: 8.6

Metadata

Metadata

Assignees

Labels

triagedIssue has been triaged by maintainers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions