class_docstr: RNN-NADE [2], a NADE parameterized by an RNN.
  
  The NADE's bias parameters are given by the output of the RNN.
  
  [2]: https://arxiv.org/abs/1206.6392
  
  Args:
    rnn_cell: The tf.nn.rnn_cell.RnnCell to use.
    num_dims: The number of binary dimensions for each observation.
    num_hidden: The number of hidden units in the NADE.
class_docstr_tok: ["RNN-NADE","[","2","]",",","a","NADE","parameterized","by","an","RNN",".","The","NADE","'s","bias","parameters","are","given","by","the","output","of","the","RNN",".","[","2","]",":","https",":","\/\/arxiv.org\/abs\/1206.6392","Args",":","rnn_cell",":","The","tf.nn.rnn_cell.RnnCell","to","use",".","num_dims",":","The","number","of","binary","dimensions","for","each","observation",".","num_hidden",":","The","number","of","hidden","units","in","the","NADE","."]
docstr: Computes a sample and its probability from each of a batch of states.
  
  Args:
    state: An RnnNadeStateTuple containing the state of the RNN-NADE for each
        sample, sized
        `([batch_size, self._nade.num_hidden], [batch_size, num_dims],
          [batch_size, self._rnn_cell.state_size]`).
  
  Returns:
    sample: A sample for each input state, sized `[batch_size, num_dims]`.
    log_prob: The log probability of each sample, sized `[batch_size, 1]`.
docstr_tok: ["Computes","a","sample","and","its","probability","from","each","of","a","batch","of","states",".","Args",":","state",":","An","RnnNadeStateTuple","containing","the","state","of","the","RNN-NADE","for","each","sample",",","sized","`","(","[","batch_size",",","self._nade.num_hidden","]",",","[","batch_size",",","num_dims","]",",","[","batch_size",",","self._rnn_cell.state_size","]","`",")",".","Returns",":","sample",":","A","sample","for","each","input","state",",","sized","`","[","batch_size",",","num_dims","]","`",".","log_prob",":","The","log","probability","of","each","sample",",","sized","`","[","batch_size",",","1","]","`","."]
code: def sample_single(self, state):
      """Computes a sample and its probability from each of a batch of states.
  
      Args:
        state: An RnnNadeStateTuple containing the state of the RNN-NADE for each
            sample, sized
            `([batch_size, self._nade.num_hidden], [batch_size, num_dims],
              [batch_size, self._rnn_cell.state_size]`).
  
      Returns:
        sample: A sample for each input state, sized `[batch_size, num_dims]`.
        log_prob: The log probability of each sample, sized `[batch_size, 1]`.
      """
      sample, log_prob = self._nade.sample(state.b_enc, state.b_dec)
  
      return sample, log_prob
  
file_path: magenta/magenta/models/pianoroll_rnn_nade/pianoroll_rnn_nade_graph.py
imports: import collections
  import magenta
  from magenta.common import Nade
  from magenta.contrib import seq2seq
  from magenta.models.shared import events_rnn_graph
  import tensorflow.compat.v1
  import tf_slim
label_desc: Use image node_id 6 for calling the RnnNade obj's underlying member method code with example usage: obj.sample_single(state) and returns: sample,  log_prob