parameters: (tf_node, graph)
docstring: convert reshape
      :param tf_node:
      :param graph:
      :return:
docstring_summary: convert reshape
      :param tf_node:
      :param graph:
      :return:
docstring_tokens: convert reshape : param tf_node : : param graph : : return :
function: def parse_fusionReshape(tf_node, graph):
      '''
      convert reshape
      :param tf_node:
      :param graph:
      :return:
      '''
      assert tf_node['type'] == 'Reshape'
      input_0 = graph[tf_node['input'][0]['name']]
      input_1 = graph[tf_node['input'][1]['name']]
  
      if not (input_0['type'] == 'Const' and input_1['type'] == 'Const'): return
  
      tf_node['type'] = 'Const'
      const_value = input_0['tf_attr']['value']
      shape = input_1['tf_attr']['value']
      new_const_value = const_value.reshape(shape)
      tf_node['tf_attr'] = {'value': new_const_value}
      tf_node['input'] = []
function_tokens: def parse_fusionReshape ( tf_node , graph ) : assert tf_node [ 'type' ] == 'Reshape' input_0 = graph [ tf_node [ 'input' ] [ 0 ] [ 'name' ] ] input_1 = graph [ tf_node [ 'input' ] [ 1 ] [ 'name' ] ] if not ( input_0 [ 'type' ] == 'Const' and input_1 [ 'type' ] == 'Const' ) : return tf_node [ 'type' ] = 'Const' const_value = input_0 [ 'tf_attr' ] [ 'value' ] shape = input_1 [ 'tf_attr' ] [ 'value' ] new_const_value = const_value . reshape ( shape ) tf_node [ 'tf_attr' ] = { 'value' : new_const_value } tf_node [ 'input' ] = [ ]