With the below code, I connverted torch model to trt_model and serialized to model.engine. Is there a way to get back deserialized model_trt from the model.engine and do inference same as model_trt(x).
`model = alexnet(pretrained=True).eval().cuda()
x = torch.ones((10, 3, 224, 224)).cuda()
model_trt = torch2trt(model, [x], max_batch_size=10)
with open('model.engine','wb') as f:
f.write(model_trt.engine.serialize())`
With the below code, I connverted torch model to trt_model and serialized to model.engine. Is there a way to get back deserialized model_trt from the model.engine and do inference same as model_trt(x).
`model = alexnet(pretrained=True).eval().cuda() x = torch.ones((10, 3, 224, 224)).cuda()
model_trt = torch2trt(model, [x], max_batch_size=10) with open('model.engine','wb') as f: f.write(model_trt.engine.serialize())`