Ejemplo n.º 1
0
def test_config():
    r2_obj = RSquare(name="r_square")
    assert r2_obj.name == "r_square"
    assert r2_obj.dtype == tf.float32
    # Check save and restore config
    r2_obj2 = RSquare.from_config(r2_obj.get_config())
    assert r2_obj2.name == "r_square"
    assert r2_obj2.dtype == tf.float32
Ejemplo n.º 2
0
 def test_config(self):
     r2_obj = RSquare(name="r_square")
     self.assertEqual(r2_obj.name, "r_square")
     self.assertEqual(r2_obj.dtype, tf.float32)
     # Check save and restore config
     r2_obj2 = RSquare.from_config(r2_obj.get_config())
     self.assertEqual(r2_obj2.name, "r_square")
     self.assertEqual(r2_obj2.dtype, tf.float32)
Ejemplo n.º 3
0
def test_config(multioutput):
    r2_obj = RSquare(multioutput=multioutput, name="r_square")
    assert r2_obj.name == "r_square"
    assert r2_obj.dtype == tf.float32
    assert r2_obj.multioutput == multioutput
    # Check save and restore config
    r2_obj2 = RSquare.from_config(r2_obj.get_config())
    assert r2_obj2.name == "r_square"
    assert r2_obj2.dtype == tf.float32
    assert r2_obj2.multioutput == multioutput