You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the error message you are trying to index into a list using something that is not an integer.
You need to check what top_k is, it looks like it might be some multi-dimensional array which you can't use to index into labels_list. Or alternatively it could be that the data shapes are okay but the type is wrong, you might need to cast the data from float to int to index into labels_list.
Hi,
I'm trying to print the prediction results and the labels, in addition to accuracy.
I;m not sure what I'm doing wrong here
for mfcc, label in test_data:
prediction = tflite_inference(mfcc, tflite_path)
predicted_indices.append(np.squeeze(tf.argmax(prediction, axis=1)))
Error message
human_string = labels_list[node_id] TypeError: only integer scalar arrays can be converted to a scalar index
Thank you in advance for your help.
The text was updated successfully, but these errors were encountered: