class_docstr: Neural Autoregressive Distribution Estimator [1].
  
  [1]: https://arxiv.org/abs/1605.02226
  
  Args:
    num_dims: The number of binary dimensions for each observation.
    num_hidden: The number of hidden units in the NADE.
    internal_bias: Whether the model should maintain its own bias varaibles.
        Otherwise, external values must be passed to `log_prob` and `sample`.
class_docstr_tok: ["Neural","Autoregressive","Distribution","Estimator","[","1","]",".","[","1","]",":","https",":","\/\/arxiv.org\/abs\/1605.02226","Args",":","num_dims",":","The","number","of","binary","dimensions","for","each","observation",".","num_hidden",":","The","number","of","hidden","units","in","the","NADE",".","internal_bias",":","Whether","the","model","should","maintain","its","own","bias","varaibles",".","Otherwise",",","external","values","must","be","passed","to","`","log_prob","`","and","`","sample","`","."]
docstr: Gets the conditional probability for a single dimension.
  
  Args:
    a: Model's hidden state, sized `[batch_size, num_hidden]`.
    w_dec_i: The decoder weight terms for the dimension, sized
        `[num_hidden, 1]`.
    b_dec_i: The decoder bias terms, sized `[batch_size, 1]`.
  
  Returns:
    cond_p_i: The conditional probability of the dimension, sized
      `[batch_size, 1]`.
    cond_l_i: The conditional logits of the dimension, sized
      `[batch_size, 1]`.
docstr_tok: ["Gets","the","conditional","probability","for","a","single","dimension",".","Args",":","a",":","Model","'s","hidden","state",",","sized","`","[","batch_size",",","num_hidden","]","`",".","w_dec_i",":","The","decoder","weight","terms","for","the","dimension",",","sized","`","[","num_hidden",",","1","]","`",".","b_dec_i",":","The","decoder","bias","terms",",","sized","`","[","batch_size",",","1","]","`",".","Returns",":","cond_p_i",":","The","conditional","probability","of","the","dimension",",","sized","`","[","batch_size",",","1","]","`",".","cond_l_i",":","The","conditional","logits","of","the","dimension",",","sized","`","[","batch_size",",","1","]","`","."]
code: def _cond_prob(self, a, w_dec_i, b_dec_i):
      """Gets the conditional probability for a single dimension.
  
      Args:
        a: Model's hidden state, sized `[batch_size, num_hidden]`.
        w_dec_i: The decoder weight terms for the dimension, sized
            `[num_hidden, 1]`.
        b_dec_i: The decoder bias terms, sized `[batch_size, 1]`.
  
      Returns:
        cond_p_i: The conditional probability of the dimension, sized
          `[batch_size, 1]`.
        cond_l_i: The conditional logits of the dimension, sized
          `[batch_size, 1]`.
      """
      # Decode hidden units to get conditional probability.
      h = tf.sigmoid(a)
      cond_l_i = b_dec_i + tf.matmul(h, w_dec_i)
      cond_p_i = tf.sigmoid(cond_l_i)
      return cond_p_i, cond_l_i
  
file_path: magenta/magenta/common/nade.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import tensorflow.compat.v1
  import tensorflow_probability
label_desc: Use image node_id 6 for calling the Nade obj's underlying member method code with example usage: obj._cond_prob(a, w_dec_i, b_dec_i) and returns: cond_p_i,  cond_l_i