tensorflow_probability/python/bijectors/masked_autoregressive.py
def _create_masks(degrees):
  """Returns a list of binary mask matrices enforcing autoregressivity."""
  return [
      # Create input->hidden and hidden->hidden masks.
      inp[:, np.newaxis] <= out
      for inp, out in zip(degrees[:-1], degrees[1:])
  ] + [
      # Create hidden->output mask.
      degrees[-1][:, np.newaxis] < degrees[0]
  ]
def _create_masks(degrees):
  return [
      # Create input->hidden and hidden->hidden masks.
      inp[:, np.newaxis] <= out
      for inp, out in zip(degrees[:-1], degrees[1:])
  ] + [
      # Create hidden->output mask.
      degrees[-1][:, np.newaxis] < degrees[0]
  ]
def _create_masks ( degrees ) : return [ # Create input->hidden and hidden->hidden masks. inp [ : , np . newaxis ] <= out for inp , out in zip ( degrees [ : - 1 ] , degrees [ 1 : ] ) ] + [ # Create hidden->output mask. degrees [ - 1 ] [ : , np . newaxis ] < degrees [ 0 ] ]
Returns a list of binary mask matrices enforcing autoregressivity.
Returns a list of binary mask matrices enforcing autoregressivity .