class_docstr: Define a SketchRNN model.
class_docstr_tok: ["Define","a","SketchRNN","model","."]
docstr: Initializer for the SketchRNN model.
  
  Args:
     hps: a HParams object containing model hyperparameters
     gpu_mode: a boolean that when True, uses GPU mode.
     reuse: a boolean that when true, attemps to reuse variables.
docstr_tok: ["Initializer","for","the","SketchRNN","model",".","Args",":","hps",":","a","HParams","object","containing","model","hyperparameters","gpu_mode",":","a","boolean","that","when","True",",","uses","GPU","mode",".","reuse",":","a","boolean","that","when","true",",","attemps","to","reuse","variables","."]
code: def __init__(self, hps, gpu_mode=True, reuse=False):
      """Initializer for the SketchRNN model.
  
      Args:
         hps: a HParams object containing model hyperparameters
         gpu_mode: a boolean that when True, uses GPU mode.
         reuse: a boolean that when true, attemps to reuse variables.
      """
      self.hps = hps
      with tf.variable_scope("vector_rnn", reuse=reuse):
          if not gpu_mode:
              with tf.device("/cpu:0"):
                  tf.logging.info("Model using cpu.")
                  self.build_model(hps)
          else:
              tf.logging.info("Model using gpu.")
              self.build_model(hps)
  
file_path: magenta/magenta/models/sketch_rnn/model.py
imports: import random
  from magenta.contrib import training
  from magenta.models.sketch_rnn import rnn
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 1 to create a new Model object from inherited base classes: object with example: obj = Model(hps, gpu_mode, reuse)