codes/Python/p03-neural-networks/2-convolutional-neural-networks/convolutional-nn.py
def create_model(features):
    '''
    This function creates the architecture model.
    :param features: The input features.
    :return: The output of the network which its dimentionality is num_classes.
    '''
    with C.layers.default_options(init = C.layers.glorot_uniform(), activation = C.ops.relu):

            # Features are the initial values.
            hidden_out = features

            # Creating some convolutional layers
            hidden_out = C.layers.Convolution2D(filter_shape=(3, 3),
                                       num_filters=16,
                                       strides=(2, 2),
                                       pad=True, name='first_conv')(hidden_out)
            hidden_out = C.layers.Convolution2D(filter_shape=(5, 5),
                                       num_filters=64,
                                       strides=(2, 2),
                                       pad=True, name='second_conv')(hidden_out)

            # Last layer connected to Softmax.
            network_output = C.layers.Dense(num_classes, activation=None, name='classify')(hidden_out)
            return network_output

    This function creates the architecture model.
    :param features: The input features.
    :return: The output of the network which its dimentionality is num_classes.
    
This function creates the architecture model.
This function creates the architecture model .
def create_model(features):
    with C.layers.default_options(init = C.layers.glorot_uniform(), activation = C.ops.relu):
            hidden_out = features
            hidden_out = C.layers.Convolution2D(filter_shape=(3, 3),
                                       num_filters=16,
                                       strides=(2, 2),
                                       pad=True, name='first_conv')(hidden_out)
            hidden_out = C.layers.Convolution2D(filter_shape=(5, 5),
                                       num_filters=64,
                                       strides=(2, 2),
                                       pad=True, name='second_conv')(hidden_out)
            network_output = C.layers.Dense(num_classes, activation=None, name='classify')(hidden_out)
            return network_output
def create_model ( features ) : with C . layers . default_options ( init = C . layers . glorot_uniform ( ) , activation = C . ops . relu ) : hidden_out = features hidden_out = C . layers . Convolution2D ( filter_shape = ( 3 , 3 ) , num_filters = 16 , strides = ( 2 , 2 ) , pad = True , name = 'first_conv' ) ( hidden_out ) hidden_out = C . layers . Convolution2D ( filter_shape = ( 5 , 5 ) , num_filters = 64 , strides = ( 2 , 2 ) , pad = True , name = 'second_conv' ) ( hidden_out ) network_output = C . layers . Dense ( num_classes , activation = None , name = 'classify' ) ( hidden_out ) return network_output
This function creates the architecture model.
This function creates the architecture model .
'''
    This function creates the architecture model.
    :param features: The input features.
    :return: The output of the network which its dimentionality is num_classes.
    ''' # Features are the initial values. # Creating some convolutional layers # Last layer connected to Softmax.
The output of the network which its dimentionality is num_classes.
The output of the network which its dimentionality is num_classes .
features
The input features.
The input features .