-
Notifications
You must be signed in to change notification settings - Fork 265
Open
Description
Traceback (most recent call last):
File "/workspace/ppq/ppq/samples/TensorRT/Example_Fp32.py", line 17, in
builder.create_engine(engine_path='Output/yolov8s.engine', precision="fp16")
File "/workspace/ppq/ppq/samples/TensorRT/trt_infer.py", line 259, in create_engine
log.info("Serializing engine to file: {:}".format(engine_path))
AttributeError: 'NoneType' object has no attribute 'serialize'
我发现 是这里的engine返回值为None,怎么解决呢
engine = self.builder.build_engine(self.network, self.config)
print(engine)
if not engine:
log.error("Failed to build the TensorRT engine")
with open(engine_path, "wb") as f:
log.info("Serializing engine to file: {:}".format(engine_path))
f.write(engine.serialize())
Metadata
Metadata
Assignees
Labels
No labels