class_docstr: Class for RNN melody generation models.
docstr: Evaluate the log likelihood of a melody under the model.
  
  Args:
    melody: The Melody object for which to evaluate the log likelihood.
  
  Returns:
    The log likelihood of `melody` under this model.
code: def melody_log_likelihood(self, melody):
      """Evaluate the log likelihood of a melody under the model.
  
      Args:
        melody: The Melody object for which to evaluate the log likelihood.
  
      Returns:
        The log likelihood of `melody` under this model.
      """
      melody_copy = copy.deepcopy(melody)
  
      melody_copy.squash(
          self._config.min_note,
          self._config.max_note,
          self._config.transpose_to_key,
      )
  
      return self._evaluate_log_likelihood([melody_copy])[0]
  
file_path: magenta/magenta/models/melody_rnn/melody_rnn_model.py
imports: import copy
  from magenta.contrib import training
  from magenta.models.shared import events_rnn_model
  import note_seq
  from note_seq.protobuf import generator_pb2
label_desc: Use image node_id 2 for calling the MelodyRnnModel obj's underlying member method code with example usage: obj.melody_log_likelihood(melody) and returns: self