timeserio.keras.utils module

timeserio.keras.utils.iterlayers(model)[source]

Return iterable over all layers (and sub-layers) of a model.

This works because a keras Model is a sub-class of Layer. Can be used for freezing/un-freezing layers, etc.

Return type

Iterable[Layer]

timeserio.keras.utils.seed_random()[source]

Seed all random number generators to ensure repeatable tests.

Sets python, numpy, and tensorflow random seeds to a repeatable states. This is useful in tests, but should not be used in production.

https://keras.io/getting-started/faq/#how-can-i-obtain-reproducible-results-using-keras-during-development