Skip to content

Instantly share code, notes, and snippets.

@attila-dusnoki-htec
Last active June 6, 2024 10:52
Show Gist options
  • Save attila-dusnoki-htec/7765ab5660d23e6ab9fb5008f8d77030 to your computer and use it in GitHub Desktop.
Save attila-dusnoki-htec/7765ab5660d23e6ab9fb5008f8d77030 to your computer and use it in GitHub Desktop.
protobuf-inspector partial config file for TF2 SavedModel
types = {
"root": {
1: ("int64", "schema_version"),
2: ("meta_graph_def", "meta_graph"),
},
"meta_graph_def": {
1: ("meta_info_def", "meta_info"),
2: ("graph_def", "graph"),
3: ("saver_def", "saver"),
4: ("collection_def", "collcetions"),
5: ("signature_def", "signatures"),
6: ("asset_file_def", "asset_files"),
7: ("saved_object_graph_def", "saved_object_graph"),
},
"meta_info_def": {
1: ("string", "meta_graph_version"),
2: ("op_list", "stripped_op_list"),
3: ("string", "any_info"),
4: ("string", "tags"),
5: ("string", "tf_version"),
6: ("string", "tf_git_version"),
7: ("bool", "stripped_default_attrs"),
},
"op_list": {},
"graph_def": {
1: ("node_def", "node"),
2: ("function_def_library", "library"),
3: ("int32", "version"),
4: ("version", "versions"),
5: ("graph_debug_info", "debug_info"),
},
"node_def": {
1: ("string", "name"),
2: ("string", "op"),
3: ("string", "input"),
4: ("string", "device"),
# 5: ("attr_def", "attr"),
5: ("name_attr_list_def", "attr"),
},
"attr_def": {
# 1: ("list_value", "list"),
# 1: ("string", "name"),
7: ("tensor_shape_def", "shape"),
9: ("string", "placeholder"),
10: ("name_attr_list_def", "func")
},
"tensor_shape_def": {
2: ("dim_def", "dim"),
3: ("bool", "unknown_rank")
},
"dim_def": {
1: ("int64", "size"),
2: ("string", "name")
},
"list_value": {},
"name_attr_list_def": {
1: ("string", "name"),
2: ("attr_def", "attr")
},
"version": {},
"function_def_library": {},
"graph_debug_info": {},
"saver_def": {},
"collection_def": {},
"signature_def": {},
"asset_file_def": {},
"saved_object_graph_def": {
1: ("saved_object_def", "nodes"),
2: ("saved_concrete_func_def", "concrete_funcs")
},
"saved_object_def": {},
"saved_concrete_func_def": {},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment