try:
embedding = self.preprocess_graph.calculate_embedding(image_bytes)
except errors.InvalidArgumentError as e:
context.aggregate_to(incompatible_image, 1)
logging.warning("Could not encode an image from %s: %s", uri, str(e))
return
if embedding.any():
After Change
def _float_feature(value):
return tf.train.Feature(float_list=tf.train.FloatList(value=value))
try:
element = element.element
except AttributeError:
pass
uri, label_ids, image_bytes = element
try:
embedding = self.preprocess_graph.calculate_embedding(image_bytes)