title: ValueError: Layer weight shape (3, 3, 3, 64) not compatible with provided weight shape (64, 3, 3, 3) when using keras
body: <p>I have the same error described in <a href="https://stackoverflow.com/questions/48283625/valueerror-layer-weight-shape-3-3-3-64-not-compatible-with-provided-weight">ValueError: Layer weight shape (3, 3, 3, 64) not compatible with provided weight shape (64, 3, 3, 3)</a></p>
  
  <p>When I used : </p>
  
  <pre><code>K.set_image_dim_ordering('tf')
  </code></pre>
  
  <p>I got this error </p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;input&gt;", line 1, in &lt;module&gt;
  AttributeError: module 'keras.backend' has no attribute 'set_image_dim_ordering'
  </code></pre>
  
  <p>When I used an other solution:</p>
  
  <pre><code>from keras.utils.conv_utils import convert_kernel
  reshaped_weights = convert_kernel(weights)
  model.layers[k].set_weights(reshaped_weights)
  </code></pre>
  
  <p>I got this error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;input&gt;", line 1, in &lt;module&gt;
    File "&lt;input&gt;", line 11, in load_model_weights
    File "/home/khawkha/.virtualenvs/DeepMS/lib/python3.6/site-packages/keras/utils/conv_utils.py", line 78, in convert_kernel
      raise ValueError('Invalid kernel shape:', kernel.shape)
  ValueError: ('Invalid kernel shape:', (0,))
  </code></pre>
  
  <p>keras version: '2.3.1'
  Tensorflow version: 1.15.0</p>