title: Using Tensorflow Layers in Keras
body: <p>I've been trying to build a sequential model in Keras using the pooling layer <code>tf.nn.fractional_max_pool</code>. I know I could try making my own custom layer in Keras, but I'm trying to see if I can use the layer already in Tensorflow. For the following code snippet:</p>
  
  <pre><code>p_ratio=[1.0, 1.44, 1.44, 1.0]
  
  model = Sequential()
  model.add(ZeroPadding2D((2,2), input_shape=(1, 48, 48)))
  model.add(Conv2D(320, (3, 3), activation=PReLU()))
  model.add(ZeroPadding2D((1,1)))
  model.add(Conv2D(320, (3, 3), activation=PReLU()))
  model.add(InputLayer(input_tensor=tf.nn.fractional_max_pool(model.layers[3].output, p_ratio)))
  </code></pre>
  
  <p>I get this <a href="https://i.stack.imgur.com/LEziD.png" rel="noreferrer">error</a>. I've tried some other things with <code>Input</code> instead of <code>InputLayer</code> and also the Keras Functional API but so far no luck.</p>