parameters: (self, original_node)
docstring: Replaces a Conv2D node with the eight bit equivalent sub-graph.
docstring_summary: Replaces a Conv2D node with the eight bit equivalent sub-graph.
docstring_tokens: Replaces a Conv2D node with the eight bit equivalent sub - graph .
function: def eightbitize_conv_node(self, original_node):
      """Replaces a Conv2D node with the eight bit equivalent sub-graph."""
      all_input_names = self.add_eightbit_prologue_nodes(original_node)
      quantized_conv_name = original_node.name + "_eightbit_quantized_conv"
      quantized_conv_node = create_node("QuantizedConv2D", quantized_conv_name,
                                        all_input_names)
      copy_attr(quantized_conv_node, "strides", original_node.attr["strides"])
      copy_attr(quantized_conv_node, "padding", original_node.attr["padding"])
      set_attr_dtype(quantized_conv_node, "Tinput", tf.quint8)
      set_attr_dtype(quantized_conv_node, "Tfilter", tf.quint8)
      set_attr_dtype(quantized_conv_node, "out_type", tf.qint32)
      self.add_output_graph_node(quantized_conv_node)
      quantize_down_name = self.add_quantize_down_node(original_node,
                                                       quantized_conv_name)
      self.add_dequantize_result_node(quantize_down_name, original_node.name)
function_tokens: def eightbitize_conv_node ( self , original_node ) : all_input_names = self . add_eightbit_prologue_nodes ( original_node ) quantized_conv_name = original_node . name + "_eightbit_quantized_conv" quantized_conv_node = create_node ( "QuantizedConv2D" , quantized_conv_name , all_input_names ) copy_attr ( quantized_conv_node , "strides" , original_node . attr [ "strides" ] ) copy_attr ( quantized_conv_node , "padding" , original_node . attr [ "padding" ] ) set_attr_dtype ( quantized_conv_node , "Tinput" , tf . quint8 ) set_attr_dtype ( quantized_conv_node , "Tfilter" , tf . quint8 ) set_attr_dtype ( quantized_conv_node , "out_type" , tf . qint32 ) self . add_output_graph_node ( quantized_conv_node ) quantize_down_name = self . add_quantize_down_node ( original_node , quantized_conv_name ) self . add_dequantize_result_node ( quantize_down_name , original_node . name )