Commit ae9006bb authored by lucas_miranda's avatar lucas_miranda
Browse files

Modified LSTMs to work with cuDNN implementation

parent 979f6212
This diff is collapsed.
This diff is collapsed.
......@@ -13,7 +13,7 @@ tfd = tfp.distributions
tfpl = tfp.layers
# Helper functions
def far_away_uniform_initialiser(shape, minval=0, maxval=15, iters=1000000):
def far_away_uniform_initialiser(shape, minval=0, maxval=15, iters=10000000):
"""
Returns a uniformly initialised matrix in which the columns are as far as possible
"""
......
......@@ -195,7 +195,7 @@ class SEQ_2_SEQ_GMVAE:
if self.prior == "standard_normal":
init_means = far_away_uniform_initialiser(
[self.number_of_components, self.ENCODING], minval=0, maxval=15
[self.number_of_components, self.ENCODING], minval=0, maxval=1
)
self.prior = tfd.mixture.Mixture(
......@@ -204,7 +204,7 @@ class SEQ_2_SEQ_GMVAE:
),
components=[
tfd.Independent(
tfd.Normal(loc=tf.zeros(self.ENCODING), scale=1,),
tfd.Normal(loc=init_means[k], scale=1,),
reinterpreted_batch_ndims=1,
)
for k in range(self.number_of_components)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment