Skip to content

Commit

Permalink
ensure inputs to graphs are float in onnx and tensorrt export
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-clarifai committed Dec 30, 2021
1 parent 7e24fa7 commit f62cf69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/onnx2tensorrt.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _prepare_input_img(img_path: str,
# prepare data
data = dict(img=img_path)
data = test_pipeline(data)
imgs = data['img']
imgs = [img.float() for img in data['img']]
img_metas = [i.data for i in data['img_metas']]

if rescale_shape is not None:
Expand Down
2 changes: 1 addition & 1 deletion tools/pytorch2onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def _prepare_input_img(img_path,
# prepare data
data = dict(img=img_path)
data = test_pipeline(data)
imgs = data['img']
imgs = [img.float() for img in data['img']]
img_metas = [i.data for i in data['img_metas']]

if rescale_shape is not None:
Expand Down

0 comments on commit f62cf69

Please sign in to comment.