title: Keras k_pool2d backend function raises a type error
body: <p>I need to make some operations with the Keras backend functions for R and I'm getting the following type error with the <code>k_pool2d</code> function:</p>
  
  <pre><code>library(keras)
  
  m &lt;- array(matrix(c(1, 1, 1, 0, 0, 
                      0, 1, 1, 1, 0, 
                      0, 0, 1, 1, 1, 
                      0, 0, 1, 1, 0, 
                      0, 1, 1, 0, 0), nrow=5, ncol=5, byrow=TRUE), dim=c(1, 5, 5, 1))
  
  m &lt;- k_constant(m)
  
  k_pool2d(m, pool_size=c(2, 2), strides=c(1, 1), padding="valid", data_format="channels_last", pool_mode="max")
  </code></pre>
  
  <blockquote>
    <p>Error in py_call_impl(callable, dots$args, dots$keywords): TypeError: can only concatenate tuple (not "list") to tuple</p>
    
    <p>Detailed traceback: 
      File "/usr/local/share/.virtualenvs/r-tensorflow/lib/python2.7/site-packages/tensorflow/python/keras/backend.py", line 4613, in pool2d
        strides = (1,) + strides + (1,)</p>
  </blockquote>
  
  <p>I understand that <code>strides=c(1, 1)</code> is a list instead a tuple, but this error does not raise with <code>pool_size=c(2, 2)</code>, for example. Trying the <code>k_conv2d</code> function does not raise this error either.</p>
  
  <p>If I try to convert <code>c(1, 1)</code> to a tuple with <code>tuple(c(1, 1))</code> then a new error raises:</p>
  
  <blockquote>
    <p>Error in as.integer(strides): cannot coerce type 'environment' to vector of type 'integer'</p>
  </blockquote>
  
  <p>This new error is the result of a conflict between <code>as.integer(tuple(c(1, 1)))</code> and the type of <code>m</code>, which is "environment".</p>
  
  <p>Have any of you experienced this same issue?</p>
  
  <p>Thank you in advance.</p>