On this page
FuseCustomConfig
class torch.ao.quantization.fx.custom_config.FuseCustomConfig
[source]-
Custom configuration for
fuse_fx()
.Example usage:
fuse_custom_config = FuseCustomConfig().set_preserved_attributes(["attr1", "attr2"])
classmethod from_dict(fuse_custom_config_dict)
[source]-
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
set_preserved_attributes(attributes)
[source]-
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
to_dict()
[source]-
Convert this
FuseCustomConfig
to a dictionary with the items described infrom_dict()
.
© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/2.1/generated/torch.ao.quantization.fx.custom_config.FuseCustomConfig.html