Created
July 20, 2021 06:23
-
-
Save lazuxd/94d31f22a5e45fe93be863ad80a1c52b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def reset_state(self, num_samples: int) -> None: | |
def get_init_values(): | |
return [tf.zeros((num_samples, self.inter_time_step_size), | |
dtype=tf.double) for i in range(self.depth)] | |
self.a = get_init_values() | |
if self.unit_type == 'lstm': | |
self.c = get_init_values() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment