Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Special-case display of "LSTM" name #147

Merged
merged 1 commit into from
Nov 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion ADBench/plot_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def graph_data(build_type, objective, maybe_test_size, function_type):

test_size = ", ".join([utils.cap_str(s) for s in maybe_test_size[0].split("_")]) if len(maybe_test_size) == 1 else None
has_ts = test_size is not None
graph_name = (f"{objective.upper()}" +
graph_name = (f"{objective_display_name(objective)}" +
(f" ({test_size})" if has_ts else "") +
f" [{function_type.capitalize()}] - {build_type}")
graph_save_location = os.path.join(build_type, function_type, f"{graph_name} Graph")
Expand All @@ -85,6 +85,18 @@ def graph_data(build_type, objective, maybe_test_size, function_type):

return (graph_name, graph_save_location)

# What we call LSTM is not quite a full LSTM. Rather it's an LSTM
# with diagonal weight matrices. We don't want to be misleading so we
# rename the graph. Eventually we will implement a full LSTM and we
# will remove this special case. See
#
# https://github.com/awf/ADBench/issues/143
def objective_display_name(objective):
if objective.upper() == "LSTM":
return "D-LSTM"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the "D" mean?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Diagonal"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about using the whole word? I.e. "DIAGONAL-LSTM" or even "LSTM (diagonal)"? I think this would be more informative

else:
return objective.upper()

has_manual = lambda tool: tool.lower() in ["manual", "manual_eigen"]

def tool_names(graph_files):
Expand Down