anchor.diff:  
   [source,python]
   ----
  +import numpy as np
  +import tensorflow as tf
  +
  +from keras import backend as K
  +from keras.layers import merge, Lambda, Layer
  +
   class Connection(Layer):
       """Takes a list of inputs, resizes them to the same shape, and outputs a weighted merge.
       """
  -    def __init__(self, nb_layer_inputs, init_value=0.5, merge_mode='concat', **kwargs):
  +    def __init__(self, init_value=0.5, merge_mode='concat', **kwargs):
           self.init_value = init_value
           self.merge_mode = merge_mode
  -        self.nb_layer_inputs = nb_layer_inputs
           super(Connection, self).__init__(**kwargs)
   
       def _ensure_same_size(self, inputs):
  
positive.code:         cols = min([K.int_shape(x)[2] for x in inputs])
          return [tf.image.resize_bilinear(x, [rows, cols]) for x in inputs]
  
      def build(self, input_shape):
          # Create a trainable weight variable for this connection
          self.W = [K.variable(np.ones(shape=1) * self.init_value) for _ in range(self.nb_layer_inputs)]
          self._trainable_weights.extend(self.W)
          super(Connection, self).build(input_shape)
  
  
negative.code: 2. We have to define trainable weights in `build` per keras custom layer link:https://keras.io/layers/writing-your-own-keras-layers/[docs]. We need as many weights and number of inputs.
  3. `call` computes sigmoid weighted inputs (I tested without sigmoid, and as expected, sigmoid weighing which mostly "allows or disallows inputs" worked a lot better), merged with defined merge strategy. We can tweak `init_value` and `merge_mode` to try various init strategies for weights and different merge strategies.
  
  The fully connected net using layers defined below, followed by sequential `Dense` layers using the above code is shown in fig.
  
  [source,python]
  ----
  layers = [
  	Convolution2D(32, 3, 3, border_mode='same', activation='relu', bias=False),
  	Convolution2D(32, 3, 3, bias=False, activation='relu'),
  	MaxPooling2D(pool_size=(2, 2)),
  	Dropout(0.25),
  
  	Convolution2D(64, 3, 3, bias=False, activation='relu', border_mode='same'),
  	Convolution2D(64, 3, 3, bias=False, activation='relu'),
  	MaxPooling2D(pool_size=(2, 2)),
  	Dropout(0.25)
  ]
  ----
  
  [.text-center]
  .Fully connected network, except for `Dense` layers.
  image::diff_neural/model.jpg[model]
  
  == Discussion
  NOTE: Experimentation is still a work in progress. Check back for updates.
  