conv_out3=MyConvnetLayer(W3,B3,input=conv_out2.output,filter_shape=(128, 256, 3, 3),image_shape=(batch_size, 256, 10, 10),conv_stride=(1,1))

    conv_out4=MyConvnetLayer(W4,B4,input=conv_out3.output,filter_shape=(128, 128, 3, 3),image_shape=(batch_size, 128, 8, 8),conv_stride=(1,1))

    layer5_input = conv_out4.output.flatten(2)

    # construct a fully-connected sigmoidal layer
    full_5 = HiddenLayer(
            W5,B5,
            input=layer5_input,
            n_in=128 * 6 * 6,
            n_out=256,
            activation=T.tanh
    )
    # classify the values of the fully-connected sigmoidal layer
    full_5_softmax = LogisticRegression(W6,B6,input=full_5.output, n_in=256, n_out=5)
    weight_decay=1e-5
    # the cost we minimize during training is the NLL of the model

    prova=theano.function([x,y],
              y,
               #updates=updates,
               allow_input_downcast=True,on_unused_input='ignore'
            )

    validate_model=theano.function([x,y],
               [full_5_softmax.errors(y),full_5_softmax.y_pred],
               allow_input_downcast=True,on_unused_input='ignore'
            )

    # CARICAMENTO JSON CONTENENTI LE POSELET POSITIVE/NEGATIVE