Table of Contents
Shortcuts

# FuseCustomConfig

class torch.ao.quantization.fx.custom_config.FuseCustomConfig

  Custom configuration for `fuse_fx()`.

  Example usage:

      fuse_custom_config = FuseCustomConfig().set_preserved_attributes(["attr1", "attr2"])

  classmethod from_dict(fuse_custom_config_dict)

    Create a `ConvertCustomConfig` from a dictionary with the following items:

    > “preserved_attributes”: a list of attributes that persist even if they are not used in `forward`

    This function is primarily for backward compatibility and may be removed in the future.

    Return type:

      FuseCustomConfig

  set_preserved_attributes(attributes)

    Set the names of the attributes that will persist in the graph module even if they are not used in the model’s `forward` method.

    Return type:

      FuseCustomConfig

  to_dict()

    Convert this `FuseCustomConfig` to a dictionary with the items described in `from_dict()`.

    Return type:

      Dict[str, Any]

## Docs

Access comprehensive developer documentation for PyTorch

View Docs

## Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

## Resources

Find development resources and get your questions answered

View Resources

To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.