title: Computing cosine similarity between vector and matrix in Keras
body: <p>I have a vector as input for a layer.
  For this vector I would like to calculate the cosine similariy to several other vectors (that can be arranged in a matrix)</p>
  
  <p>Example (other vectors: c1,c2,c3 ...):</p>
  
  <pre><code>Input: 
  v 
  (len(v) = len(c1) = len(c2) ...)
  
  Output: 
  [cosinsSimilarity(v,c1),cosineSimilarity(v,c2),cosineSimilarity(v,c3),consinSimilarity(v,...)]
  </code></pre>
  
  <p>I think the problem could be solved by an approach like the following:</p>
  
  <p><code>cosineSimilarity (v, matrix (c1, c2, c3, ...))</code></p>
  
  <p>but unfortunately I have no idea how I can implement that in a keras layer with input_shape(1,len(v)) and output_shape(1,columns(matrix))</p>