Skip to content
Snippets Groups Projects
  • Bhatu's avatar
    378b347a
    Add support for ":0" indexing of nodes in graphdef · 378b347a
    Bhatu authored
    Sometimes the generated graph defs specify the 0'th output explicitly.
    Example:
    node {
      name: "abc"
      input: "Placeholder_1:0"
    }
    node {
      name: "Placeholder_1"
      op: "Placeholder"
    }
    Node abc specifies that it wants the 0th output of the Placeholder_1 node.
    However in single output nodes, the tensor name is same as node name. So
    Placeholder_1:0 tensor cannot be found. The same is also true for the 0th output
    of multiple output nodes (output tensor names will be node_name,node_name:1,..)
    
    So while parsing the graph def we strip away any ":0" from the input names.
    378b347a
    History
    Add support for ":0" indexing of nodes in graphdef
    Bhatu authored
    Sometimes the generated graph defs specify the 0'th output explicitly.
    Example:
    node {
      name: "abc"
      input: "Placeholder_1:0"
    }
    node {
      name: "Placeholder_1"
      op: "Placeholder"
    }
    Node abc specifies that it wants the 0th output of the Placeholder_1 node.
    However in single output nodes, the tensor name is same as node name. So
    Placeholder_1:0 tensor cannot be found. The same is also true for the 0th output
    of multiple output nodes (output tensor names will be node_name,node_name:1,..)
    
    So while parsing the graph def we strip away any ":0" from the input names.