parameters: (node: Node)
docstring: Infer output shapes of the node using TF to infer the values of output tensors and then getting tensor shapes.
      If all inputs of the node are constants then the node's attribute 'value' is updated also.
      :param node: sub-graph node to infer. The function updates 'shape' and 'data_type' attributes of the node.
      :return: None
docstring_summary: Infer output shapes of the node using TF to infer the values of output tensors and then getting tensor shapes.
      If all inputs of the node are constants then the node's attribute 'value' is updated also.
      :param node: sub-graph node to infer. The function updates 'shape' and 'data_type' attributes of the node.
      :return: None
docstring_tokens: Infer output shapes of the node using TF to infer the values of output tensors and then getting tensor shapes . If all inputs of the node are constants then the node s attribute value is updated also . : param node : sub - graph node to infer . The function updates shape and data_type attributes of the node . : return : None
function: def tf_subgraph_infer(node: Node):
      """
      Infer output shapes of the node using TF to infer the values of output tensors and then getting tensor shapes.
      If all inputs of the node are constants then the node's attribute 'value' is updated also.
      :param node: sub-graph node to infer. The function updates 'shape' and 'data_type' attributes of the node.
      :return: None
      """
      # TODO: try to not infer values but just infer the output tensors shapes.
      add_placeholders_to_subgraph(node)
  
      all_constants, output_tensors = get_subgraph_output_tensors(node)
      for out_port, tensor_value in output_tensors.items():
          out_node = node.out_node(out_port)
          out_node.shape = mo_array([dim for dim in tensor_value.shape])
          out_node.data_type = tensor_value.dtype
          log.debug("Inferred shape of the output tensor with index '{}' of the node '{}': '{}'".format(str(out_port),
                                                                                                        node.name,
                                                                                                        out_node.shape))
          if all_constants:
              out_node.value = tensor_value
function_tokens: def tf_subgraph_infer ( node : Node ) : # TODO: try to not infer values but just infer the output tensors shapes. add_placeholders_to_subgraph ( node ) all_constants , output_tensors = get_subgraph_output_tensors ( node ) for out_port , tensor_value in output_tensors . items ( ) : out_node = node . out_node ( out_port ) out_node . shape = mo_array ( [ dim for dim in tensor_value . shape ] ) out_node . data_type = tensor_value . dtype log . debug ( "Inferred shape of the output tensor with index '{}' of the node '{}': '{}'" . format ( str ( out_port ) , node . name , out_node . shape ) ) if all_constants : out_node . value = tensor_value