Skip to content

Commit

Permalink
deepcopy to noop reducer
Browse files Browse the repository at this point in the history
  • Loading branch information
kshpv committed Nov 14, 2024
1 parent 6e8ff73 commit 346e5ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nncf/experimental/common/tensor_statistics/collectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def get_inplace_fn(self) -> Optional[InplaceInsertionFNType]:
return None

def _reduce_out_of_place(self, x: List[TensorType]) -> List[TensorType]:
return x
return deepcopy(x)


class RawReducer(NoopReducer):
Expand Down Expand Up @@ -543,7 +543,7 @@ def __init__(self, num_samples: Optional[int]):
super().__init__(None, num_samples=num_samples)

def _register_reduced_input_impl(self, x: TensorType) -> None:
self._container.append(deepcopy(x))
self._container.append(x)

def _aggregate_impl(self):
return self._container
Expand Down

0 comments on commit 346e5ea

Please sign in to comment.