It is because the API of tensorflow has changed and the code needs to be adjusted.
turn out to be
bbox_begin, bbox_size, _ = tf.image.sample_distorted_bounding_box(tf.shape(image), bounding_boxes=bbox)
adjust to:
bbox_begin, bbox_size, _ = tf.image.sample_distorted_bounding_box(tf.shape(image), bounding_boxes=bbox,min_object_covered=0.1)