Hi,
I am getting an error on the final function in the Jazz exercise. Not sure what the problem is. I changed the axis to be 0 and still the same error.
Thank you for any help.
Neil
n_values = x_initializer.shape[2]
Step 1:
pred = inference_model([x_initializer, a_initializer, c_initializer])
Step 2:
indices = np.argmax(pred, axis=-1)
Step 3:
results = to_categorical(indices, num_classes=x_initializer.shape[2])
return results, indices
I
ndexError Traceback (most recent call last) in 1 results, indices = predict_and_sample(inference_model, x_initializer, a_initializer, c_initializer) 2 ----> 3 print(“np.argmax(results[12]) =”, np.argmax(results[12])) 4 print(“np.argmax(results[17]) =”, np.argmax(results[17])) 5 print(“list(indices[12:18]) =”, list(indices[12:18])) IndexError: index 12 is out of bounds for axis 0 with size 1