original_docstring: 
      Counts the number weights and FLOPs in the model for convolution and fully connected layers.
  
      :param graph: NNCFGraph.
      :param input_shapes: Dictionary of input dimension shapes for convolutions and
          fully connected layers. E.g {node_name: (height, width)}
      :param output_shapes: Dictionary of output dimension shapes for convolutions and
          fully connected layers. E.g {node_name: (height, width)}
      :param conv_op_metatypes: List of metatypes defining convolution operations.
      :param linear_op_metatypes: List of metatypes defining linear/fully connected operations.
      :param input_channels: Dictionary of input channels number in convolutions.
          If not specified, taken from the graph. {node_name: channels_num}
      :param output_channels: Dictionary of output channels number in convolutions.
          If not specified, taken from the graph. {node_name: channels_num}
      :return number of FLOPs for the model
              number of weights (params) in the model
      
docstring: Counts the number weights and FLOPs in the model for convolution and fully connected layers.
docstring_tokens: Counts the number weights and FLOPs in the model for convolution and fully connected layers .
code: def count_flops_and_weights(graph: NNCFGraph,
                              input_shapes: Dict[NNCFNodeName, List[int]],
                              output_shapes: Dict[NNCFNodeName, List[int]],
                              conv_op_metatypes: List[Type[OperatorMetatype]],
                              linear_op_metatypes: List[Type[OperatorMetatype]],
                              input_channels: Dict[NNCFNodeName, int] = None,
                              output_channels: Dict[NNCFNodeName, int] = None) -> Tuple[int, int]:
      """
      Counts the number weights and FLOPs in the model for convolution and fully connected layers.
  
      :param graph: NNCFGraph.
      :param input_shapes: Dictionary of input dimension shapes for convolutions and
          fully connected layers. E.g {node_name: (height, width)}
      :param output_shapes: Dictionary of output dimension shapes for convolutions and
          fully connected layers. E.g {node_name: (height, width)}
      :param conv_op_metatypes: List of metatypes defining convolution operations.
      :param linear_op_metatypes: List of metatypes defining linear/fully connected operations.
      :param input_channels: Dictionary of input channels number in convolutions.
          If not specified, taken from the graph. {node_name: channels_num}
      :param output_channels: Dictionary of output channels number in convolutions.
          If not specified, taken from the graph. {node_name: channels_num}
      :return number of FLOPs for the model
              number of weights (params) in the model
      """
      flops_pers_node, weights_per_node = count_flops_and_weights_per_node(graph,
                                                                           input_shapes, output_shapes,
                                                                           conv_op_metatypes, linear_op_metatypes,
                                                                           input_channels, output_channels)
      return sum(flops_pers_node.values()), sum(weights_per_node.values())
code_tokens: def count_flops_and_weights ( graph : NNCFGraph , input_shapes : Dict [ NNCFNodeName , List [ int ] ] , output_shapes : Dict [ NNCFNodeName , List [ int ] ] , conv_op_metatypes : List [ Type [ OperatorMetatype ] ] , linear_op_metatypes : List [ Type [ OperatorMetatype ] ] , input_channels : Dict [ NNCFNodeName , int ] = None , output_channels : Dict [ NNCFNodeName , int ] = None ) -> Tuple [ int , int ] : flops_pers_node , weights_per_node = count_flops_and_weights_per_node ( graph , input_shapes , output_shapes , conv_op_metatypes , linear_op_metatypes , input_channels , output_channels ) return sum ( flops_pers_node . values ( ) ) , sum ( weights_per_node . values ( ) )
short_docstring: Counts the number weights and FLOPs in the model for convolution and fully connected layers.
short_docstring_tokens: Counts the number weights and FLOPs in the model for convolution and fully connected layers .
comment: """
      Counts the number weights and FLOPs in the model for convolution and fully connected layers.
  
      :param graph: NNCFGraph.
      :param input_shapes: Dictionary of input dimension shapes for convolutions and
          fully connected layers. E.g {node_name: (height, width)}
      :param output_shapes: Dictionary of output dimension shapes for convolutions and
          fully connected layers. E.g {node_name: (height, width)}
      :param conv_op_metatypes: List of metatypes defining convolution operations.
      :param linear_op_metatypes: List of metatypes defining linear/fully connected operations.
      :param input_channels: Dictionary of input channels number in convolutions.
          If not specified, taken from the graph. {node_name: channels_num}
      :param output_channels: Dictionary of output channels number in convolutions.
          If not specified, taken from the graph. {node_name: channels_num}
      :return number of FLOPs for the model
              number of weights (params) in the model
      """