planet/networks/conv_ha.py
def decoder(state, data_shape):
  """Compute the data distribution of an observation from its state."""
  #hidden = keras.layers.Dense(500, activation='relu')(state)
  #hidden = keras.layers.Dense(500, activation='relu')(hidden)
  #hidden = keras.layers.Dense(26)(hidden)
  hidden = tf.layers.dense(state, 500, tf.nn.relu)
  hidden = tf.layers.dense(hidden, 500, tf.nn.relu)
  hidden = tf.layers.dense(hidden, 26, None)
  mean = hidden
  mean = tf.reshape(mean, tools.shape(state)[:-1] + data_shape)
  dist = tools.MSEDistribution(mean)
  dist = tfd.Independent(dist, len(data_shape))
  return dist
Compute the data distribution of an observation from its state.
Compute the data distribution of an observation from its state.
Compute the data distribution of an observation from its state .
def decoder(state, data_shape):
  hidden = tf.layers.dense(state, 500, tf.nn.relu)
  hidden = tf.layers.dense(hidden, 500, tf.nn.relu)
  hidden = tf.layers.dense(hidden, 26, None)
  mean = hidden
  mean = tf.reshape(mean, tools.shape(state)[:-1] + data_shape)
  dist = tools.MSEDistribution(mean)
  dist = tfd.Independent(dist, len(data_shape))
  return dist
def decoder ( state , data_shape ) : hidden = tf . layers . dense ( state , 500 , tf . nn . relu ) hidden = tf . layers . dense ( hidden , 500 , tf . nn . relu ) hidden = tf . layers . dense ( hidden , 26 , None ) mean = hidden mean = tf . reshape ( mean , tools . shape ( state ) [ : - 1 ] + data_shape ) dist = tools . MSEDistribution ( mean ) dist = tfd . Independent ( dist , len ( data_shape ) ) return dist
Compute the data distribution of an observation from its state.
Compute the data distribution of an observation from its state .
"""Compute the data distribution of an observation from its state.""" #hidden = keras.layers.Dense(500, activation='relu')(state) #hidden = keras.layers.Dense(500, activation='relu')(hidden) #hidden = keras.layers.Dense(26)(hidden)
state
data_shape