batuman
batuman

Reputation: 7304

How TensorRT process data?

In Tensorflow, Tensor format is NxWxHxC and go through the network.

When Tensorflow model is converted to TensorRT engine, how Tensor data is processed. Same shape as in Thensoflow or flattened.

Flattened means, for example, 1x3x4x3 Tensor

[[[1,2,3],[4,5,6],[7,8,9],[10,11,12]],
     [[1,2,3],[4,5,6],[7,8,9],[10,11,12]],
     [[1,2,3],[4,5,6],[7,8,9],[10,11,12]]]

is flattened into

[1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,12]

single array and processed.

Upvotes: 0

Views: 68

Answers (1)

batuman
batuman

Reputation: 7304

TensorRT processes data in NCHW format. When the data is flattened, it is in NCHW format. That means, data is flattened as

1,4,7,10,1,4,7,10,1,4,7,10,2,5,8,11,2,5,8,11,2,5,8,11,3,6,9,12,3,6,9,12,3,6,9,12

Upvotes: 0

Related Questions