Skip to content

[Bug] InstanceNorm2d with relax not supported #17842

@sidsingla

Description

@sidsingla

Hi,
TVM version: 0.20.dev0

Here is the Traceback:

Traceback (most recent call last):

File "/home/sidharth_modiface_com/looks_factory_tvm/looks-factory-transfer/convert_to_tvm.py", line 93, in <module>
  mod = from_fx(
        ^^^^^^^^
File "/opt/conda/envs/py311-looks-factory-tvm/lib/python3.11/site-packages/tvm/relax/frontend/torch/fx_translator.py", line 1064, in from_fx
  return TorchFXImporter().from_fx(
         ^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/py311-looks-factory-tvm/lib/python3.11/site-packages/tvm/relax/frontend/torch/fx_translator.py", line 935, in from_fx
  assert (
AssertionError: Unsupported module type <class 'torch.nn.modules.instancenorm.InstanceNorm2d'>

Code snippet:

from tvm.relax.frontend.torch import from_fx

mod = from_fx(
        fx_graph,
        [((1, 3, 256, 256), "float32"), ((1, 1, 256, 256), "float32")],
        keep_params_as_input=True,
    )

Model is mostly based on pix2pix GAN model.
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triagePRs or issues that need to be investigated by maintainers to find the right assignees to address ittype: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions