Skip to content

How to convert model from double to float #266

Closed
@inocsin

Description

@inocsin

When I try to complie torchscript model, I get this log

DEBUG: [TRTorch Conversion Context] - Found IValue containing object of type Double(requires_grad=0, device=cpu)
terminate called after throwing an instance of 'trtorch::Error'
  what():  [enforce fail at core/util/trt_util.cpp:293] Expected aten_trt_type_map.find(t) != aten_trt_type_map.end() to be true but got false
Unsupported Aten datatype

So I try to convert model to float using this

script_model = torch.jit.load(path)
script_model = script_model.eval()
script_model = script_model.float()
script_model.save(new_path)

And it still throw this error

Metadata

Metadata

Labels

component: coreIssues re: The core compilerquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions