Instantiates a `Loss` from its config (output of `get_config()`). Args: config: Output of `get_config()`. Returns: A `Loss` instance.
(cls, config)
| 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} |
no outgoing calls