title: TensorFlow Dataset `.map` - Is it possible to ignore errors?
body: <h3>Short version:</h3>
  
  <p>When using Dataset <code>map</code> operations, is it possible to specify that any 'rows' where the <code>map</code> invocation results in an error are quietly filtered out rather than having the error bubble up and kill the whole session?</p>
  
  <h3>Specifics:</h3>
  
  <p>I have an input pipeline set up that (more or less) does the following:</p>
  
  <ol>
  <li>reads a set of file paths of images stored locally (images of varying dimensions)</li>
  <li>reads a suggested set of 'bounding boxes' from a csv</li>
  <li>Produces the set of all image path to bounding box combinations</li>
  <li>Reads and decodes the image then produces the set of 'cropped' images for each of these combinations using <code>tf.image.crop_to_bounding_box</code></li>
  </ol>
  
  <p>My issue is that there are (very rare) instances where my suggested bounding boxes are outside the bounds of a given image so (understandably) <code>tf.image.crop_to_bounding_box</code> throws an error something like this:</p>
  
  <pre><code>tensorflow.python.framework.errors_impl.InvalidArgumentError: assertion failed: [width must be &gt;= target + offset.]
  </code></pre>
  
  <p>which kills the session. </p>
  
  <p>I'd prefer it if these errors were simply ignored and that the pipeline moved onto the next combination.</p>
  
  <p>(I understand that the <strong>correct</strong> fix for this specific issue would be commit the time to checking each bounding box and image dimension size are possible the step before and filter them out using a <code>filter</code> operation before it got to the <code>map</code> with the cropping operation. I was wondering if there was an easy way to just ignore an error and move on to the next case both for easy of implementation in this specific case and also in more general cases)</p>