-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
When using classes
in the following,
# class_list = ["a", "B", ...]
class_tensor = tf.constant(class_list)
indices = tf.constant(list(range(0,len(class_list))))
table = tf.contrib.lookup.index_to_string_table_from_tensor(class_tensor)
classes = table.lookup(tf.to_int64(indices))
signature = predict_signature_def(inputs={"input": inputs},
outputs={
"scores": outputs,
"classes": classes})
I get the following error,
{
"error": "Prediction failed during encoding instances"
}
Without the classes key though, I get the output back just fine. What could be causing this? All examples in the repo seem to use signature_def_utils.build_signature_def()
vs just predict_signature_def
, so I'm not sure what could be going wrong here.
Metadata
Metadata
Assignees
Labels
No labels