def test_conv_wrapper(backend_default):
 conv = Conv((4, 4, 3), Uniform())
 assert isinstance(conv, list)
 assert (len(conv) == 1)
 assert isinstance(conv[0], Convolution)
 conv = Conv((4, 4, 3), Uniform(), bias=Uniform())
 assert isinstance(conv, list)
 assert (len(conv) == 2)
 assert isinstance(conv[0], Convolution)
 assert isinstance(conv[1], Bias)
 conv = Conv((4, 4, 3), Uniform(), activation=Rectlin())
 assert isinstance(conv, list)
 assert (len(conv) == 2)
 assert isinstance(conv[0], Convolution)
 assert isinstance(conv[1], Activation)
 conv = Conv((4, 4, 3), Uniform(), bias=Uniform(), activation=Rectlin())
 assert isinstance(conv, list)
 assert isinstance(conv[0], Convolution)
 assert isinstance(conv[1], Bias)
 assert isinstance(conv[2], Activation)
 assert (len(conv) == 3)

def test_conv_wrapper ( backend_default ) : conv = Conv ( ( 4 , 4 , 3 ) , Uniform ( ) ) assert isinstance ( conv , list ) assert ( len ( conv ) == 1 ) assert isinstance ( conv [ 0 ] , Convolution ) conv = Conv ( ( 4 , 4 , 3 ) , Uniform ( ) , bias = Uniform ( ) ) assert isinstance ( conv , list ) assert ( len ( conv ) == 2 ) assert isinstance ( conv [ 0 ] , Convolution ) assert isinstance ( conv [ 1 ] , Bias ) conv = Conv ( ( 4 , 4 , 3 ) , Uniform ( ) , activation = Rectlin ( ) ) assert isinstance ( conv , list ) assert ( len ( conv ) == 2 ) assert isinstance ( conv [ 0 ] , Convolution ) assert isinstance ( conv [ 1 ] , Activation ) conv = Conv ( ( 4 , 4 , 3 ) , Uniform ( ) , bias = Uniform ( ) , activation = Rectlin ( ) ) assert isinstance ( conv , list ) assert isinstance ( conv [ 0 ] , Convolution ) assert isinstance ( conv [ 1 ] , Bias ) assert isinstance ( conv [ 2 ] , Activation ) assert ( len ( conv ) == 3 )
verify that the conv wrapper constructs the right layer objects .