Skip to content

Commit

Permalink
Comment
Browse files Browse the repository at this point in the history
  • Loading branch information
daniil-lyakhov committed Aug 27, 2024
1 parent 67cd745 commit ed8fb24
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nncf/experimental/torch/fx/model_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# limitations under the License.

from collections import defaultdict
from copy import deepcopy
from typing import List, Set

import torch
Expand All @@ -26,10 +25,12 @@
class FXModelTransformer(ModelTransformer):
"""
Applies transformations upon Torch FX model.
FXApplyTransformationCommands are made inplace,
PTModelExtractionCommands do not change the input model.
"""

def __init__(self, model: torch.fx.GraphModule):
super().__init__(deepcopy(model))
super().__init__(model)

self._command_transformation_ordered_pairs = [
(FXApplyTransformationCommand, self._apply_transformation),
Expand Down

0 comments on commit ed8fb24

Please sign in to comment.