parameters: (self, original_node)
docstring: Replaces a MatMul node with the eight bit equivalent sub-graph.
docstring_summary: Replaces a MatMul node with the eight bit equivalent sub-graph.
docstring_tokens: Replaces a MatMul node with the eight bit equivalent sub - graph .
function: def eightbitize_mat_mul_node(self, original_node):
      """Replaces a MatMul node with the eight bit equivalent sub-graph."""
      quantized_mat_mul_name = original_node.name + "_eightbit_quantized_bias_add"
      all_input_names = self.add_eightbit_prologue_nodes(original_node)
      quantized_mat_mul_node = create_node(
          "QuantizedMatMul", quantized_mat_mul_name,
          all_input_names)
      set_attr_dtype(quantized_mat_mul_node, "T1", tf.quint8)
      set_attr_dtype(quantized_mat_mul_node, "T2", tf.quint8)
      set_attr_dtype(quantized_mat_mul_node, "Toutput", tf.qint32)
      copy_attr(quantized_mat_mul_node, "transpose_a",
                original_node.attr["transpose_a"])
      copy_attr(quantized_mat_mul_node, "transpose_b",
                original_node.attr["transpose_b"])
      self.add_output_graph_node(quantized_mat_mul_node)
      quantize_down_name = self.add_quantize_down_node(original_node,
                                                       quantized_mat_mul_name)
      self.add_dequantize_result_node(quantize_down_name, original_node.name)
function_tokens: def eightbitize_mat_mul_node ( self , original_node ) : quantized_mat_mul_name = original_node . name + "_eightbit_quantized_bias_add" all_input_names = self . add_eightbit_prologue_nodes ( original_node ) quantized_mat_mul_node = create_node ( "QuantizedMatMul" , quantized_mat_mul_name , all_input_names ) set_attr_dtype ( quantized_mat_mul_node , "T1" , tf . quint8 ) set_attr_dtype ( quantized_mat_mul_node , "T2" , tf . quint8 ) set_attr_dtype ( quantized_mat_mul_node , "Toutput" , tf . qint32 ) copy_attr ( quantized_mat_mul_node , "transpose_a" , original_node . attr [ "transpose_a" ] ) copy_attr ( quantized_mat_mul_node , "transpose_b" , original_node . attr [ "transpose_b" ] ) self . add_output_graph_node ( quantized_mat_mul_node ) quantize_down_name = self . add_quantize_down_node ( original_node , quantized_mat_mul_name ) self . add_dequantize_result_node ( quantize_down_name , original_node . name )