anchor.diff:          cols = min([K.int_shape(x)[2] for x in inputs])
           return [tf.image.resize_bilinear(x, [rows, cols]) for x in inputs]
   
  +    def _merge(self, inputs):
  +        """Define other merge ops like [+, X, avg] here.
  +        """
  +        if self.merge_mode == 'concat':
  +            return merge(inputs, mode=self.merge_mode, concat_axis=-1)
  +        else:
  +            raise RuntimeError('mode {} is invalid'.format(self.merge_mode))
  +
       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.W = [K.variable(np.ones(shape=1) * self.init_value) for _ in range(len(input_shape))]
           self._trainable_weights.extend(self.W)
           super(Connection, self).build(input_shape)
   
  
positive.code:         resized_inputs = self._ensure_same_size(layer_inputs)
  
          # Compute sigmoid weighted inputs
          weighted_inputs = [resized_inputs[i] * K.sigmoid(self.W[i]) for i in range(self.nb_layer_inputs)]
  
          # Merge according to provided merge strategy.
          merged = merge(weighted_inputs, mode=self.merge_mode, concat_axis=-1)
  
          # Cache this for use in `get_output_shape_for`
          self._out_shape = K.int_shape(merged)
  
negative.code: 
  [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, init_value=0.5, merge_mode='concat', **kwargs):
          self.init_value = init_value
          self.merge_mode = merge_mode
          super(Connection, self).__init__(**kwargs)
  
      def _ensure_same_size(self, inputs):
  