(self)
| 1856 | [(v, np.zeros((self.num_thresholds,))) for v in self.variables]) |
| 1857 | |
| 1858 | def get_config(self): |
| 1859 | config = { |
| 1860 | 'num_thresholds': self.num_thresholds, |
| 1861 | 'curve': self.curve.value, |
| 1862 | 'summation_method': self.summation_method.value, |
| 1863 | # We remove the endpoint thresholds as an inverse of how the thresholds |
| 1864 | # were initialized. This ensures that a metric initialized from this |
| 1865 | # config has the same thresholds. |
| 1866 | 'thresholds': self.thresholds[1:-1], |
| 1867 | } |
| 1868 | base_config = super(AUC, self).get_config() |
| 1869 | return dict(list(base_config.items()) + list(config.items())) |
| 1870 | |
| 1871 | |
| 1872 | @keras_export('keras.metrics.CosineSimilarity') |
no outgoing calls