NVIDIA / object-detection-tensorrt-example

Running object detection on a webcam feed using TensorRT on NVIDIA GPUs in Python.
211 stars 61 forks source link

Changing batch size causing shape problem #17

Open Kmarconi opened 4 years ago

Kmarconi commented 4 years ago

Hi,

I'm trying to change the batch_size of the model ( and so the max_batch_size macro too) but i'm always running into shape error like this one : ValueError: could not broadcast input array from shape (270000) into shape (8640000)

I guess something need to be changed in this line : np.copyto(self.inputs[0].host, img.ravel()) (from inference.py line 178) so that both shapes correspond to the new batch but I'm not finding how,can you help me ?

Thanks