Skip to content

Conversation

@stes
Copy link
Contributor

@stes stes commented Jul 7, 2024

Minor fix to correct a type annotation from torch.tensor to torch.Tensor.


Background:

I noticed this by getting the following error when running torch.jit.script on the model.

RuntimeError: 
Unknown type name 'torch.tensor':
  File "/opt/conda/lib/python3.10/site-packages/timm/models/hrnet.py", line 837
    def forward(self, x) -> List[torch.tensor]:
                                 ~~~~~~~~~~~~ <--- HERE
        out = []
        x = self.conv1(x)

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@rwightman rwightman merged commit 648aaa4 into huggingface:main Jul 8, 2024
@stes stes deleted the patch-1 branch July 8, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants