Skip to content

Commit

Permalink
fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
rainyfly committed Jun 20, 2022
1 parent 38fb847 commit 54eeab7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions visualdl/component/graph/graph_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ def analyse_model(model_pb): # noqa: C901
attr_type_dict = {}
for attr_name in op_desc.attr_names():
attr_dict[attr_name] = op_desc.attr(attr_name)
attr_type_dict[attr_name] = attr_type_name[op_desc.attr_type(
attr_name)]
attr_type = op_desc.attr_type(attr_name)
attr_type_dict[attr_name] = attr_type_name[
attr_type] if attr_type in attr_type_name else str(
attr_type).split('.')[1]
all_ops[op_name]['attrs'] = attr_dict
all_ops[op_name]['attr_types'] = attr_type_dict
all_ops[op_name]['children_node'] = []
Expand Down

0 comments on commit 54eeab7

Please sign in to comment.