Closed kisisjrlly closed 2 years ago
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.
Describe the bug
使用for-torch 优化模型时出错,以resnest50d为例:
代码如下: ` origion_model = timm.create_model('resnest50d', pretrained=True)
infer_mode = 'float16' # float32 / float16 / int8_calib / int8 jit_model = torch.jit.script(origion_model).cpu().eval()
model_path="resnest50dbs{}-half_{}_jit_cpu.pt".format(batch_size,half)
jit_model.save(model_path)
dummy = torch.randn(batch_size, 3, 244, 244)
builder = forward.TorchBuilder()
builder.set_mode(infer_mode)
engine = builder.build(model_path, dummy) print(engine) outputs = engine.forward(dummy) print(outputs) os._exit(-1) `
Environment
TensorRT Version: 7.2.3.4 NVIDIA GPU: T4 NVIDIA Driver Version: 440.33.01 CUDA Version: 10.2 CUDNN Version: 7 Operating System: ubuntu 18.04 Python Version (if applicable): 3.6 Tensorflow Version (if applicable): 2.3.4 PyTorch Version (if applicable): 1.10.1
Relevant Files
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.