def __init__(self, vmin, vmax, num_atoms, dense_kwargs=None): super().__init__() if dense_kwargs is None: dense_kwargs = models.default_dense_kwargs() self.distributional_layer = tf.keras.layers.Dense( num_atoms, **dense_kwargs) self.values = tf.cast(tf.linspace(vmin, vmax, num_atoms), tf.float32)
def __init__(self, loc_activation='tanh', dense_loc_kwargs=None, scale_activation='softplus', scale_min=1e-4, scale_max=1, dense_scale_kwargs=None, distribution=tfp.distributions.MultivariateNormalDiag): super().__init__() self.loc_activation = loc_activation if dense_loc_kwargs is None: dense_loc_kwargs = models.default_dense_kwargs() self.dense_loc_kwargs = dense_loc_kwargs self.scale_activation = scale_activation self.scale_min = scale_min self.scale_max = scale_max if dense_scale_kwargs is None: dense_scale_kwargs = models.default_dense_kwargs() self.dense_scale_kwargs = dense_scale_kwargs self.distribution = distribution
def __init__(self, activation='tanh', dense_kwargs=None): super().__init__() self.activation = activation if dense_kwargs is None: dense_kwargs = models.default_dense_kwargs() self.dense_kwargs = dense_kwargs
def __init__(self, dense_kwargs=None): super().__init__() if dense_kwargs is None: dense_kwargs = models.default_dense_kwargs() self.v_layer = tf.keras.layers.Dense(1, **dense_kwargs)