question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warning: Encountered known unsupported method torch.instance_norm

See original GitHub issue

Hi, thanks for the great repo!!! I tried with both installations: with and without plugins from master and got the same warnings. The conversion ended and speedup was large but the output was very different. For reference that’s the model I was trying to convert: https://github.com/KaiyangZhou/deep-person-reid/blob/master/torchreid/models/osnet_ain.py

Warning: Encountered known unsupported method torch.instance_norm
Warning: Encountered known unsupported method torch.nn.functional.instance_norm

Are you planning to support this? Or should I just switch to batch_norm?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jaybdubcommented, Dec 6, 2019

Hi anuar12,

Thanks for your feedback!

I agree, it seems like it would be possible to implement with some combination of native TensorRT layers. Usually this is easier and more distributable than integrating a plugin.

I’ll look into it if I can find time. If you can easily use batch norm, that may be your safest bet for now.

Best, John

0reactions
anuar12commented, Dec 13, 2019

I just tested it on my network and it has worked! Thanks a lot John!

Tested my network (https://github.com/KaiyangZhou/deep-person-reid/blob/master/torchreid/models/osnet_ain.py) batch_size=8: [8, 3, 256, 128] images on Xavier: Plain Pytorch eval Forward-pass time: 0.048 s TRT FP32 Forward-pass time: 0.031 s TRT FP16 Forward-pass time: 0.018 s

Had to change flatten(1) to view() because flatten was not supported.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Warning: Encountered known unsupported method torch.randn
I was trying to convert my torch model to tensorRT I encountered with this problem. ** Encountered known unsupported method torch.randn**.
Read more >
Scene to text recognition on jetson nano
Warning : Encountered known unsupported method torch.zeros. Warning: Encountered known unsupported method torch.Tensor.hash
Read more >
PyTorch 1.9.0 Now Available - Exxact Corporation
LongTensor(a, device='cpu') RuntimeError: Legacy tensor constructor of the form torch.Tensor(tensor, device=device) is not supported. Use torch.
Read more >
onnx export of instance_norm for unknown channel size. - You ...
python import torch import torch.nn as nn class TestModel(nn.Module): def __init__(self, num_features, init_size=None): super(TestModel, self).
Read more >
tensorrt torch2trt遇到warning: encountered known ...
tensorrt torch2trt遇到warning: encountered known unsupported method torch.max_pool3d问题的解决. S.T.A.R. 于 2021-05-10 11:16:32 发布 1013 收藏 6.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found