def test_serialization(): layer = PolynomialCrossing(projection_dim=None) serialized_layer = tf.keras.layers.serialize(layer) new_layer = tf.keras.layers.deserialize(serialized_layer) assert layer.get_config() == new_layer.get_config()
def test_serialization(self): layer = PolynomialCrossing(projection_dim=None) serialized_layer = tf.keras.layers.serialize(layer) new_layer = tf.keras.layers.deserialize(serialized_layer) self.assertEqual(layer.get_config(), new_layer.get_config())