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

Method from_config

tensorflow/python/keras/losses.py:129–138  ·  view source on GitHub ↗

Instantiates a `Loss` from its config (output of `get_config()`). Args: config: Output of `get_config()`. Returns: A `Loss` instance.

(cls, config)

Source from the content-addressed store, hash-verified

127
128 @classmethod
129 def from_config(cls, config):
130 """Instantiates a `Loss` from its config (output of `get_config()`).
131
132 Args:
133 config: Output of `get_config()`.
134
135 Returns:
136 A `Loss` instance.
137 """
138 return cls(**config)
139
140 def get_config(self):
141 return {'reduction': self.reduction, 'name': self.name}

Callers 15

test_meanMethod · 0.45
test_accuracyMethod · 0.45
test_configMethod · 0.45
test_configMethod · 0.45
test_configMethod · 0.45
test_configMethod · 0.45
test_configMethod · 0.45
test_configMethod · 0.45

Calls

no outgoing calls

Tested by 15

test_meanMethod · 0.36
test_accuracyMethod · 0.36
test_configMethod · 0.36
test_configMethod · 0.36
test_configMethod · 0.36
test_configMethod · 0.36
test_configMethod · 0.36
test_configMethod · 0.36