classes = predict_response["classes"]
lengths = examples[self.lengths_key]
result = []
num_ex = examples[self.lengths_key].shape[0]
for i in range(num_ex):
length_i = lengths[i]
classes_i = classes[i]
d = [np.array(classes_i[j]) for j in range(length_i)]
After Change
if self.return_labels:
d = [(c, np.float32(s)) for c, s in zip(classes_i, score_i)]
else:
d = [(np.int32(c), np.float32(s)) for c, s in zip(classes_i, score_i)]
result.append(d)
return result