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