byhang
byhang
I encountered the same problem!
shape = tuple(t.shape) # don't exclude batch when adding constants...? weight = t.detach().cpu().numpy() weight = trt.Weights(np.ascontiguousarray(weight, dtype=np.float32)) # fixed t._trt = network.add_constant(shape, weight).get_output(0)
Tell you secretly, the YOLO layer has no weight and does not to be converted.
You can convert your pytorch YOLO model before the three YOLO layers, because this series of problems come from them.
I encountered the same problem. Any solution?