title: Keras 2 code is executing keras 1 compatibility code
body: <p>I am trying to run an example that uses keras/tensorflow. I am using Keras 2.0.8.
  When I write this simple code:</p>
  
  <pre><code>from keras.layers import ZeroPadding2D
  pad = ZeroPadding2D(padding=(1, 1), data_format=None)
  </code></pre>
  
  <p>and try to debug <code>ZeroPadding2D</code> I am directed to a file named <code>convolutional.py</code> which contains statement as <code>@interfaces.legacy_zeropadding2d_support</code>. I am a bit lost there but I think this is a compatibility code for keras 1.
  I checked the keras 1 and 2 definition of <code>ZeroPadding2D</code>:</p>
  
  <pre><code># keras 1
  keras.layers.convolutional.ZeroPadding2D(padding=(1, 1), dim_ordering='default') 
  
  # keras 2
  keras.layers.ZeroPadding2D(padding=(1, 1), data_format=None)
  </code></pre>
  
  <ul>
  <li>since my import is explicitly referring to keras 2 (it does not include any <code>convolutional</code> in the import) and</li>
  <li>my function call is also keras 2 specific as it contains <code>data_format</code> parameter should I be directed to a keras 2 implementation?</li>
  </ul>
  
  <p>What am I missing here? I know there is special care with <em>compatibility interfaces</em> as mentioned in <a href="https://blog.keras.io/introducing-keras-2.html" rel="nofollow noreferrer">here</a> for running keras 1 code inside keras 2 but is something in my (tiny) code that is keras 1? </p>
  
  <p>I am relatively new to python (if not obvious) and I am debugging using pyCharm if this makes a difference.</p>
  
  <p>So, how am I suppose to run just keras 2 code and secondly what am I missing in the situation above?</p>