- Notifications
You must be signed in to change notification settings - Fork 4.4k
Open
Description
In the function generate_text (section 2.6, lab1/TF_Part2_Music_Generation), there is this code snippet:
# Here batch size == 1 model.reset_states() tqdm._instances.clear() However, our model is a Sequential model, with an LSTM layer. I get the error model.reset_states() does not exist in tf.keras.models.Sequential. My workaround is changing the code snippet from previous to this:
# Here batch size == 1 for layer in model.layers: if hasattr(layer, 'reset_states'): layer.reset_states() tqdm._instances.clear() Just posting if anyone else gets this error! Thanks!
jfahrenkrug
Metadata
Metadata
Assignees
Labels
No labels