Skip to content
This repository was archived by the owner on Aug 25, 2025. It is now read-only.

Conversation

@ki-arie
Copy link

@ki-arie ki-arie commented Jun 21, 2023

Issue:

When creating ONNX file or Pytorch JIT trace, this utils file throws a type error, as the torch.Size() function expects an array of ints not torch tensors.

Fix:

Extract int from torch tensor, using .item()func call.

# Issue:

When creating ONNX file or Pytorch JIT trace, this utils file throws a type error, as the `torch.Size()` function expects an array of ints not torch tensors.

# Fix:
Extract int from torch tensor, using `.item()`func call.
@ki-arie ki-arie marked this pull request as draft June 21, 2023 03:25
@ki-arie ki-arie marked this pull request as ready for review June 21, 2023 03:25
@LWQ2EDU
Copy link

LWQ2EDU commented Oct 10, 2023

the fix causes TracerWarning
16969026687986
maybe it's better to use the function in this issues
#182

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants