MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / from_config

Method from_config

tensorflow/python/ops/init_ops_v2.py:70–89  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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=[])

Callers

nothing calls this directly

Calls 1

popMethod · 0.45

Tested by

no test coverage detected