Instantiates an initializer from a configuration dictionary. Example: ```python initializer = RandomUniform(-1, 1) config = initializer.get_config() initializer = RandomUniform.from_config(config) ``` Args: config: A Python dictionary. It will typically b
(cls, config)
| 68 | |
| 69 | @classmethod |
| 70 | def from_config(cls, config): |
| 71 | """Instantiates an initializer from a configuration dictionary. |
| 72 | |
| 73 | Example: |
| 74 | |
| 75 | ```python |
| 76 | initializer = RandomUniform(-1, 1) |
| 77 | config = initializer.get_config() |
| 78 | initializer = RandomUniform.from_config(config) |
| 79 | ``` |
| 80 | |
| 81 | Args: |
| 82 | config: A Python dictionary. |
| 83 | It will typically be the output of `get_config`. |
| 84 | |
| 85 | Returns: |
| 86 | An Initializer instance. |
| 87 | """ |
| 88 | config.pop("dtype", None) |
| 89 | return cls(**config) |
| 90 | |
| 91 | |
| 92 | @tf_export("zeros_initializer", v1=[]) |