TensorFlow Dataset `.map` - Is it possible to ignore errors?

纵然是瞬间 提交于 2019-12-01 01:29:55

There is tf.contrib.data.ignore_errors. I've never tried this myself, but according to the docs the usage is simply

dataset = dataset.map(some_map_function)
dataset = dataset.apply(tf.contrib.data.ignore_errors())

It should simply pass through the inputs (i.e. returns the same dataset) but ignore any that throw an error.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!