import tensorflow as tf

# Create the output to the network.  This is our one hot encoding of 2 possible values (TODO)!
Y = tf.placeholder(name='Y', shape=[None,data_y.shape[1]], dtype=tf.float32)


print ("building network ")
for i, filter_size in enumerate(filter_list):
    with tf.variable_scope("conv/stack/{}".format(i), reuse=None):
        # initialize filter
        W = tf.get_variable(
            name='W',
            shape=[filter_size, num_feature, 1, num_filter],
            initializer=tf.contrib.layers.xavier_initializer_conv2d())
        
        # convolve w and input
        conv = tf.nn.conv2d(
            name='conv',
            input=X,
            filter=W,
            strides=[1, 1, 1, 1],
            padding='VALID')
        
        #add bias of size = out cannels
        b = tf.get_variable(
            name='b',
            shape=[num_filter],
            initializer=tf.constant_initializer(0.0))

        H = tf.nn.bias_add(
