title: Tensorflow object detection api SSD model using 'keep_aspect_ratio_resizer'
body: <p>I am trying to detect objects in different shaped images (not square). I used faster_rcnn_inception_v2 model and there I can use image resizer which maintains the aspect ratio of the image and the output is satisfactory.</p>
  
  <pre><code>image_resizer {
    keep_aspect_ratio_resizer {
      min_dimension: 100
      max_dimension: 600
    }
  }
  </code></pre>
  
  <p>Now for faster performance, I want to train it using ssd_inception_v2 or ssd_inception_v2 model. The <a href="https://github.com/tensorflow/models/tree/master/research/object_detection/samples/configs" rel="noreferrer">sample configuration</a> uses fixed shape resize as below,</p>
  
  <pre><code>image_resizer {
    fixed_shape_resizer {
      height: 300
      width: 300
    }
  }
  </code></pre>
  
  <p>But the problem is I get a very poor detection result because of that fixed resize. I tried changing it to keep_aspect_ratio_resizer as stated earlier in faster_rcnn_inception_v2. I get the following error,</p>
  
  <blockquote>
    <p>InvalidArgumentError (see above for traceback): ConcatOp : Dimensions
    of inputs should match: shape[ 0] = [1,100,500,3] vs. shape<a href="https://github.com/tensorflow/models/tree/master/research/object_detection/samples/configs" rel="noreferrer">1</a> =
    [1,100,439,3]</p>
  </blockquote>
  
  <p>How can I make the configuration in SSD models to resize the image maintaining the aspect ratio?</p>