nncf/experimental/tensorflow/nncf_network.py
def insert_at_point(self, point: TFTargetPoint, ops: List[NNCFOperation]) -> None:
        """
        Inserts the list of the NNCF operations according to the target point.

        :param point: The location where operations should be inserted.
        :param ops: List of the NNCF operarions.
        """
        ops_weights = {op.name: op.create_variables(self) for op in ops}
        hook = Hook(ops, point, ops_weights)
        hooks = getattr(self, '_pre_hooks') if hook.is_pre_hook else getattr(self, '_post_hooks')
        # TODO(andrey-churkin): What we should do if the hook with the same `target_point`
        # already exists inside `hooks`? Is it a valid case?
        hooks.setdefault(hook.target_point.op_name, []).append(hook)

        Inserts the list of the NNCF operations according to the target point.

        :param point: The location where operations should be inserted.
        :param ops: List of the NNCF operarions.
        
Inserts the list of the NNCF operations according to the target point.
Inserts the list of the NNCF operations according to the target point .
def insert_at_point(self, point: TFTargetPoint, ops: List[NNCFOperation]) -> None:
        ops_weights = {op.name: op.create_variables(self) for op in ops}
        hook = Hook(ops, point, ops_weights)
        hooks = getattr(self, '_pre_hooks') if hook.is_pre_hook else getattr(self, '_post_hooks')
        hooks.setdefault(hook.target_point.op_name, []).append(hook)
def insert_at_point ( self , point : TFTargetPoint , ops : List [ NNCFOperation ] ) -> None : ops_weights = { op . name : op . create_variables ( self ) for op in ops } hook = Hook ( ops , point , ops_weights ) hooks = getattr ( self , '_pre_hooks' ) if hook . is_pre_hook else getattr ( self , '_post_hooks' ) hooks . setdefault ( hook . target_point . op_name , [ ] ) . append ( hook )
Inserts the list of the NNCF operations according to the target point.
Inserts the list of the NNCF operations according to the target point .
"""
        Inserts the list of the NNCF operations according to the target point.

        :param point: The location where operations should be inserted.
        :param ops: List of the NNCF operarions.
        """ # TODO(andrey-churkin): What we should do if the hook with the same `target_point` # already exists inside `hooks`? Is it a valid case?
self
point
TFTargetPoint
The location where operations should be inserted.
The location where operations should be inserted .
ops
List[NNCFOperation]
List of the NNCF operarions.
List of the NNCF operarions .