Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TensorFlow: control dependencies support #224

Closed
haifenghan opened this issue Jan 29, 2019 · 1 comment
Closed

TensorFlow: control dependencies support #224

haifenghan opened this issue Jan 29, 2019 · 1 comment

Comments

@haifenghan
Copy link

There is a difference between netron and tensorboard:

TensorBoard:
image

Netron:
image

The .pbtxt code is:

node {
  name: "Const"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
        }
        int_val: 2
      }
    }
  }
}
node {
  name: "Const_1"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
        }
        int_val: 5
      }
    }
  }
}
node {
  name: "Less"
  op: "Less"
  input: "Const"
  input: "Const_1"
  attr {
    key: "T"
    value {
      type: DT_INT32
    }
  }
}
node {
  name: "cond/Switch"
  op: "Switch"
  input: "Less"
  input: "Less"
  attr {
    key: "T"
    value {
      type: DT_BOOL
    }
  }
}
node {
  name: "cond/switch_t"
  op: "Identity"
  input: "cond/Switch:1"
  attr {
    key: "T"
    value {
      type: DT_BOOL
    }
  }
}
node {
  name: "cond/switch_f"
  op: "Identity"
  input: "cond/Switch"
  attr {
    key: "T"
    value {
      type: DT_BOOL
    }
  }
}
node {
  name: "cond/pred_id"
  op: "Identity"
  input: "Less"
  attr {
    key: "T"
    value {
      type: DT_BOOL
    }
  }
}
node {
  name: "cond/Mul/y"
  op: "Const"
  input: "^cond/switch_t"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
        }
        int_val: 17
      }
    }
  }
}
node {
  name: "cond/Mul"
  op: "Mul"
  input: "cond/Mul/Switch:1"
  input: "cond/Mul/y"
  attr {
    key: "T"
    value {
      type: DT_INT32
    }
  }
}
node {
  name: "cond/Mul/Switch"
  op: "Switch"
  input: "Const"
  input: "cond/pred_id"
  attr {
    key: "T"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "_class"
    value {
      list {
        s: "loc:@Const"
      }
    }
  }
}
node {
  name: "cond/Add/y"
  op: "Const"
  input: "^cond/switch_f"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
        }
        int_val: 23
      }
    }
  }
}
node {
  name: "cond/Add"
  op: "Add"
  input: "cond/Add/Switch"
  input: "cond/Add/y"
  attr {
    key: "T"
    value {
      type: DT_INT32
    }
  }
}
node {
  name: "cond/Add/Switch"
  op: "Switch"
  input: "Const_1"
  input: "cond/pred_id"
  attr {
    key: "T"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "_class"
    value {
      list {
        s: "loc:@Const_1"
      }
    }
  }
}
node {
  name: "cond/Merge"
  op: "Merge"
  input: "cond/Add"
  input: "cond/Mul"
  attr {
    key: "N"
    value {
      i: 2
    }
  }
  attr {
    key: "T"
    value {
      type: DT_INT32
    }
  }
}
node {
  name: "Add/y"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
        }
        int_val: 3
      }
    }
  }
}
node {
  name: "Add"
  op: "Add"
  input: "cond/Merge"
  input: "Add/y"
  attr {
    key: "T"
    value {
      type: DT_INT32
    }
  }
}
versions {
  producer: 27
}

@lutzroeder
Copy link
Owner

lutzroeder commented Feb 2, 2019

0224.pbtxt.zip

@lutzroeder lutzroeder changed the title difference between netron and tensorboard TensorFlow: control dependencies support Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants