nncf/experimental/tensorflow/nncf_network.py
def _apply_post_hooks_for_inputs(self, inputs):
        """
        Applies post-hooks to inputs.

        :param inputs: Input tensor, or dict/list/tuple of input tensors.
        :return: Modified input tensor, or dict/list/tuple of input tensors.
        """
        input_name_to_post_hook_map = {
            hook.target_point.op_name: hook for hook in getattr(self, '_hooks') \
            if hook.target_point.op_type_name == 'Placeholder'
        }

        if not input_name_to_post_hook_map:
            return inputs

        xs = tf.nest.flatten(inputs)
        ys = tf.nest.flatten(self.input_signature)
        flat_sequence = []
        for input_tensor, input_spec in zip(xs, ys):
            post_hook = input_name_to_post_hook_map[input_spec.name]
            (ans,), _ = post_hook(input_tensor)
            flat_sequence.append(ans)
        return tf.nest.pack_sequence_as(inputs, flat_sequence)

        Applies post-hooks to inputs.

        :param inputs: Input tensor, or dict/list/tuple of input tensors.
        :return: Modified input tensor, or dict/list/tuple of input tensors.
        
Applies post-hooks to inputs.
Applies post - hooks to inputs .
def _apply_post_hooks_for_inputs(self, inputs):
        input_name_to_post_hook_map = {
            hook.target_point.op_name: hook for hook in getattr(self, '_hooks') \
            if hook.target_point.op_type_name == 'Placeholder'
        }
        if not input_name_to_post_hook_map:
            return inputs
        xs = tf.nest.flatten(inputs)
        ys = tf.nest.flatten(self.input_signature)
        flat_sequence = []
        for input_tensor, input_spec in zip(xs, ys):
            post_hook = input_name_to_post_hook_map[input_spec.name]
            (ans,), _ = post_hook(input_tensor)
            flat_sequence.append(ans)
        return tf.nest.pack_sequence_as(inputs, flat_sequence)
def _apply_post_hooks_for_inputs ( self , inputs ) : input_name_to_post_hook_map = { hook . target_point . op_name : hook for hook in getattr ( self , '_hooks' ) if hook . target_point . op_type_name == 'Placeholder' } if not input_name_to_post_hook_map : return inputs xs = tf . nest . flatten ( inputs ) ys = tf . nest . flatten ( self . input_signature ) flat_sequence = [ ] for input_tensor , input_spec in zip ( xs , ys ) : post_hook = input_name_to_post_hook_map [ input_spec . name ] ( ans , ) , _ = post_hook ( input_tensor ) flat_sequence . append ( ans ) return tf . nest . pack_sequence_as ( inputs , flat_sequence )
Applies post-hooks to inputs.
Applies post - hooks to inputs .
"""
        Applies post-hooks to inputs.

        :param inputs: Input tensor, or dict/list/tuple of input tensors.
        :return: Modified input tensor, or dict/list/tuple of input tensors.
        """
Modified input tensor, or dict/list/tuple of input tensors.
Modified input tensor or dict / list / tuple of input tensors .
self
inputs
Input tensor, or dict/list/tuple of input tensors.
Input tensor or dict / list / tuple of input tensors .