def primed_sample(self, cell): initial_state = cell.zero_state(self.num_samples, dtype=tf.float32) primed_state = tf.nn.dynamic_rnn(inputs=self.x_prime, cell=cell, sequence_length=self.x_prime_len, dtype=tf.float32, initial_state=initial_state, scope='rnn')[1] return rnn_free_run(cell=cell, sequence_length=self.sample_tsteps, initial_state=primed_state, scope='rnn')[1]
def sample(self, cell): initial_state = cell.zero_state(self.num_samples, dtype=tf.float32) initial_input = tf.concat([ tf.zeros([self.num_samples, 2]), tf.ones([self.num_samples, 1]), ], axis=1) return rnn_free_run(cell=cell, sequence_length=self.sample_tsteps, initial_state=initial_state, initial_input=initial_input, scope='rnn')[1]
def sample(self, cell): initial_state = cell.zero_state(self.num_samples, dtype=tf.float32) initial_input = tf.concat([ tf.zeros([self.num_samples, 2]), tf.ones([self.num_samples, 1]), ], axis=1) return rnn_free_run( cell=cell, sequence_length=self.sample_tsteps, initial_state=initial_state, initial_input=initial_input, scope='rnn' )[1]
def primed_sample(self, cell): initial_state = cell.zero_state(self.num_samples, dtype=tf.float32) primed_state = tf.nn.dynamic_rnn( inputs=self.x_prime, cell=cell, sequence_length=self.x_prime_len, dtype=tf.float32, initial_state=initial_state, scope='rnn' )[1] return rnn_free_run( cell=cell, sequence_length=self.sample_tsteps, initial_state=primed_state, scope='rnn' )[1]