I eventually submitted my assignment since I was closely approaching the deadline (1 hour left). I kept getting this error when running the following cell:
results, indices = predict_and_sample(inference_model, x_initializer, a_initializer, c_initializer)
print(“np.argmax(results[12]) =”, np.argmax(results[12]))
print(“np.argmax(results[17]) =”, np.argmax(results[17]))
print(“list(indices[12:18]) =”, list(indices[12:18]))
ERROR:
IndexError 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
I went ahead and read the Discourse discussions of other people encountering this issue. None of the advice provided helped. Eventually I submitted the assignment. To my surprise I still received 100/100. I’m just wondering what is wrong here? Either part of that cell is buggy or there is something amiss with the grader.
More than anything want to make sure that future students that take this part of the course don’t face this issue if it is in fact a bug in the assignment.