title: caffe resize image make all values 0
body: <p>I encountered this problem when working with caffe to generate HDF5 data files from images.</p>
  
  <p>the <code>caffe.io.load_image</code> loads images into a varible in the normalized range 0-1.</p>
  
  <p><strong>resizes but all values in <code>img</code> converted to zero</strong></p>
  
  <pre><code>    img = caffe.io.load_image( patht_to_file )
      print img.shape
      print img.dtype
      img = caffe.io.resize( img, (3,SIZE, SIZE) ) #resizes but all values in img converted to zero
      print img.shape
      print img.dtype
  </code></pre>
  
  <p>the output I get is </p>
  
  <pre><code>  (240, 320, 3) 
    float32
    (3, 58, 58) 
    float64
  </code></pre>
  
  <p>the values of the <code>img</code> is  changed for some values to all 0's
  could any one help me fix this.</p>
  
  <p>I would like the same float32 changing the order of the <code>resize</code> command gives the correct output
  <strong>Gives real non zero values to var <code>img</code></strong>
  <strong>but order and type is not one I need</strong></p>
  
  <pre><code>img = caffe.io.resize( img, (SIZE, SIZE, 3) ) # Gives real non zero values to var img
  print img.shape
  print img.dtype
  </code></pre>
  
  <p>output </p>
  
  <pre><code>(240, 320, 3) 
  float32
  (58, 58, 3) 
  float64
  </code></pre>
  
  <p><strong>I need the shape to be 3,58,58 without converting all values to zeros ie real data</strong> </p>