Example #1
0
def test_norm():
    """
    Test the layer.Norm class, its default attributes and errors raised. No need to test the call() function since its
    a tensorflow class
    """

    norm = layer.Norm()
    assert isinstance(norm._norm, type(tf.keras.layers.BatchNormalization()))

    with pytest.raises(ValueError):
        layer.Norm(name="none")
Example #2
0
    def test_norm(self, name: str):
        """
        Test the layer.Norm class

        :param name: name of norm
        """

        norm_layer = layer.Norm(name=name)
        assert norm_layer._norm is not None
Example #3
0
 def test_error(self):
     with pytest.raises(ValueError):
         layer.Norm(name="none")