I am using the Python API and I would like to get the output of an hidden layer after the execution of an engine. Is this possible?
We can set the layer as a network output and bind a buffer to it to collect the output.
The engine is built in C++ and run in Python. Can I do that while loading the engine in Python or should I do that when building it in C++? You can refer to this repository: tensorrtx/yolov5 at master · wang-xinyu/tensorrtx · GitHub
We cannot do while loading. We need to set the layer as a network output and regenerate the engine.