class_docstr: Implements a recurrent DQN designed to produce melody sequences.
class_docstr_tok: ["Implements","a","recurrent","DQN","designed","to","produce","melody","sequences","."]
docstr: Saves the model checkpoint, .npz file, and reward plots.
  
  Args:
    name: Name of the model that will be used on the images,
      checkpoint, and .npz files.
    directory: Path to directory where files will be saved.
      If None defaults to self.output_dir.
docstr_tok: ["Saves","the","model","checkpoint",",",".npz","file",",","and","reward","plots",".","Args",":","name",":","Name","of","the","model","that","will","be","used","on","the","images",",","checkpoint",",","and",".npz","files",".","directory",":","Path","to","directory","where","files","will","be","saved",".","If","None","defaults","to","self.output_dir","."]
code: def save_model_and_figs(self, name, directory=None):
      """Saves the model checkpoint, .npz file, and reward plots.
  
      Args:
        name: Name of the model that will be used on the images,
          checkpoint, and .npz files.
        directory: Path to directory where files will be saved.
          If None defaults to self.output_dir.
      """
  
      self.save_model(name, directory=directory)
      self.plot_rewards(
          image_name="TrainRewards-" + name + ".eps",
          directory=directory,
      )
      self.plot_evaluation(
          image_name="EvaluationRewards-" + name + ".eps",
          directory=directory,
      )
      self.plot_target_vals(
          image_name="TargetVals-" + name + ".eps", directory=directory
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import os
  import random
  import urllib
  from magenta.models.rl_tuner import note_rnn_loader
  from magenta.models.rl_tuner import rl_tuner_eval_metrics
  from magenta.models.rl_tuner import rl_tuner_ops
  import matplotlib.pyplot
  from note_seq import melodies_lib
  from note_seq import midi_io
  import numpy
  import scipy.special
  from six.moves import range
  from six.moves import reload_module
  from six.moves import urllib
  import tensorflow.compat.v1
label_desc: Use image node_id 42 for calling the RLTuner obj's underlying member method code with example usage: obj.save_model_and_figs(name, directory) without return types