keras/keras_core/testing/test_case.py
Gabriel Rasskin f48c448b72 Added MeanAbsoluteError and started testing for losses. (#11)
* Added MeanAbsoluteError and started testing for losses.

Added testing for MeanSquaredError and MeanAbsoluteError as well as testing utils.

* Formatting fix for docstrings

* Switch docstrings to keras_core
2023-04-19 00:18:20 -04:00

12 lines
312 B
Python

import unittest
import numpy as np
class TestCase(unittest.TestCase):
def assertAllClose(self, x1, x2, atol=1e-7, rtol=1e-7):
np.testing.assert_allclose(x1, x2, atol=atol, rtol=rtol)
def assertAllEqual(self, x1, x2, decimal=3):
np.testing.assert_almost_equal(x1, x2, decimal=decimal)