class_docstr: Builds graph for a Note RNN and instantiates weights from a checkpoint.
  
  Loads weights from a previously saved checkpoint file corresponding to a pre-
  trained basic_rnn model. Has functions that allow it to be primed with a MIDI
  melody, and allow it to be called to produce its predictions for the next
  note in a sequence.
  
  Used as part of the RLTuner class.
class_docstr_tok: ["Builds","graph","for","a","Note","RNN","and","instantiates","weights","from","a","checkpoint",".","Loads","weights","from","a","previously","saved","checkpoint","file","corresponding","to","a","pre-","trained","basic_rnn","model",".","Has","functions","that","allow","it","to","be","primed","with","a","MIDI","melody",",","and","allow","it","to","be","called","to","produce","its","predictions","for","the","next","note","in","a","sequence",".","Used","as","part","of","the","RLTuner","class","."]
docstr: Extracts a one-hot encoding of the most probable note.
  
  Args:
    softmax: Softmax probabilities over possible next notes.
  Returns:
    One-hot encoding of most probable note.
docstr_tok: ["Extracts","a","one-hot","encoding","of","the","most","probable","note",".","Args",":","softmax",":","Softmax","probabilities","over","possible","next","notes",".","Returns",":","One-hot","encoding","of","most","probable","note","."]
code: def get_note_from_softmax(self, softmax):
      """Extracts a one-hot encoding of the most probable note.
  
      Args:
        softmax: Softmax probabilities over possible next notes.
      Returns:
        One-hot encoding of most probable note.
      """
  
      note_idx = np.argmax(softmax)
      note_enc = rl_tuner_ops.make_onehot(
          [note_idx], rl_tuner_ops.NUM_CLASSES
      )
      return np.reshape(note_enc, (rl_tuner_ops.NUM_CLASSES))
  
imports: import os
  from magenta.common import sequence_example_lib
  from magenta.models.rl_tuner import rl_tuner_ops
  from magenta.models.shared import events_rnn_graph
  from magenta.pipelines import melody_pipelines
  import note_seq
  from note_seq import midi_io
  from note_seq import sequences_lib
  import numpy
  import tensorflow.compat.v1
  import tf_slim
label_desc: Use image node_id 11 for calling the NoteRNNLoader obj's underlying member method code with example usage: obj.get_note_from_softmax(softmax) and returns: np