mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Fix KeyError returned by _maybe_get_last_node_only_observer (#58443)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/58443 Test Plan: arc lint Reviewed By: vkuzo Differential Revision: D28494119 fbshipit-source-id: 05abf4e12051afc237096812fb0ee08a8b9447f9
This commit is contained in:
committed by
Facebook GitHub Bot
parent
46484e8dfe
commit
07da584dbd
@ -84,7 +84,7 @@ class QuantizeHandler(ABC):
|
||||
"""
|
||||
for maybe_obs_node, _ in self.last_node.users.items():
|
||||
if maybe_obs_node.op == 'call_module':
|
||||
maybe_obs = quantizer.modules[maybe_obs_node.name]
|
||||
maybe_obs = quantizer.modules[maybe_obs_node.target]
|
||||
if is_activation_post_process(maybe_obs):
|
||||
return maybe_obs
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user