Skip to content

Commit

Permalink
[Bug] Fix del redundant fakequant (#447)
Browse files Browse the repository at this point in the history
fix del redundant fakequant
  • Loading branch information
HIT-cwh authored and humu789 committed Apr 17, 2023
1 parent 6cdb394 commit 0cd361d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mmrazor/models/quantizers/native_quantizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,28 +313,28 @@ def module_prev_wo_fakequant(self):

extra_function_prev_wo_fakequant = self.extra_redundant_fakequants.get(
'extra_function_prev_wo_fakequant', tuple())
prepared = del_fakequant_before_method(
prepared = del_fakequant_before_function(
prepared,
self.function_prev_wo_fakequant + extra_function_prev_wo_fakequant,
inplace=True)

extra_function_next_wo_fakequant = self.extra_redundant_fakequants.get(
'extra_function_next_wo_fakequant', tuple())
prepared = del_fakequant_after_method(
prepared = del_fakequant_after_function(
prepared,
self.function_next_wo_fakequant + extra_function_next_wo_fakequant,
inplace=True)

extra_method_prev_wo_fakequant = self.extra_redundant_fakequants.get(
'extra_method_prev_wo_fakequant', tuple())
prepared = del_fakequant_before_function(
prepared = del_fakequant_before_method(
prepared,
self.method_prev_wo_fakequant + extra_method_prev_wo_fakequant,
inplace=True)

extra_method_next_wo_fakequant = self.extra_redundant_fakequants.get(
'extra_method_next_wo_fakequant', tuple())
prepared = del_fakequant_after_function(
prepared = del_fakequant_after_method(
prepared,
self.method_next_wo_fakequant + extra_method_next_wo_fakequant,
inplace=True)
Expand Down

0 comments on commit 0cd361d

Please sign in to comment.