title: Keras: Lambda layer function with multiple parameters
body: <p>I am trying to write a <code>Lambda</code> layer in Keras which calls a function <code>connection</code>, that runs a loop <code>for i in range(0,k)</code> where <code>k</code> is fed in as an input to the function, <code>connection(x,k)</code>. Now, when I try to call the function in the Functional API, I tried using:</p>
  
  <pre><code>k = 5
  y = Lambda(connection)(x)
  </code></pre>
  
  <p>Also,</p>
  
  <pre><code>y = Lambda(connection)(x,k)
  </code></pre>
  
  <p>But neither of those approaches worked. How can I feed in the value of <code>k</code> without assigning it as a global parameter?</p>