Plotting the activation maps from a layer, model implemented in TensorRT c++ api


I would love to view activation maps from the layers. I implemented the VGG16 model in c++ api. The model is trained in tensorflow framework and the weights have been converted and saved into .wts format as required. Marking the output node to the layer output I want to visualize,

auto out = conv1->getOutput(0);

getting the output of the layer after the inference in the float array[112 * 112 * 64], reshaping it to size, map1[112][112][64]. I am not sure if this the correct way. Can anyone please guide.