title: Can Rows of Layer Weight Matrix be Repeated Tensor Variables?
body: <p>I'm trying to model a color space transformation with a NN architecture.  I know this code won't work since the variables become tensors, but it illustrates what I'm trying to do.  Is there a different way to structure things where the variables don't become tensors and the weights matrix can still be dependent on the matrix subtraction of the concatenated vectors?  Basically I'm trying to update the color vectors and not a fully randomized weights matrix.</p>
  <pre><code>class Tetra(Layer):
  def __init__(self, units=3, input_dim=3):
      super(Tetra, self).__init__()
      w_init = tf.random_normal_initializer()
      
      self.red = tf.Variable(
          initial_value=w_init(shape=(1, 3), dtype=&quot;float32&quot;),
          trainable=True,
      )
      self.yellow = tf.Variable(
          initial_value=w_init(shape=(1, 3), dtype=&quot;float32&quot;),
          trainable=True,
      )
      self.black = tf.Variable(
          initial_value=w_init(shape=(1, 3), dtype=&quot;float32&quot;),
          trainable=True,
      )
      self.white = tf.Variable(
          initial_value=w_init(shape=(1, 3), dtype=&quot;float32&quot;),
          trainable=True,
      )
          
      self.matA = tf.concat([self.red, self.yellow,self.white], 0)
      self.matB = tf.concat([self.black,self.white,self.yellow],0)
      self.w = tf.subtract(self.matA, self.matB)
      
  def call(self, inputs):
      return tf.matmul(inputs, self.w) 
  </code></pre>