Skip to content

Commit

Permalink
[Fix] make arguments effective in tools/confusion_matrix.py (open-mml…
Browse files Browse the repository at this point in the history
…ab#1401)

* add an argument for customizing `title' of the output figure

* fix `color_theme' arguments not passing to plot function

Signed-off-by: code14 <mob5566@gmail.com>
  • Loading branch information
mob5566 authored Mar 21, 2022
1 parent 415b20f commit cfc080c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tools/confusion_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ def parse_args():
'--color-theme',
default='winter',
help='theme of the matrix color map')
parser.add_argument(
'--title',
default='Normalized Confusion Matrix',
help='title of the matrix color map')
parser.add_argument(
'--cfg-options',
nargs='+',
Expand Down Expand Up @@ -171,7 +175,9 @@ def main():
confusion_matrix,
dataset.CLASSES,
save_dir=args.save_dir,
show=args.show)
show=args.show,
title=args.title,
color_theme=args.color_theme)


if __name__ == '__main__':
Expand Down

0 comments on commit cfc080c

Please sign in to comment.