Bug in the grader

This is the grader feedback

In Code Cell 9 in function tfds.load() we expected to find split=tfds.Split.TEST and could not find it.

The split can also be specified as 'test'. Please fix the grader.

Thank you.

1 Like

Hi thanks for bringing it into our notice we will look into it and update.

I think the issue might be due to tensor flow version also please see whether you are using the correct code as the version some code works only in latest version of tensor flow

What version of tensorflow and tensorflow_datasets do you use for the assignment?

Hi, I am also having trouble to submit the homework for week 2 correctly. The grader was giving me clear feedback initially, like:

  1. Code Cell 2: the variable ‘dataset_tr’ under ‘train()’ is batched differently than expected. We expected 32 and you have 1000.
  2. Code Cell 2: the variable ‘loss_fn’ under ‘_build_model()’ has a different value than expected. We expected sparse_categorical_crossentropy and you have <tensorflow.python.keras.losses.SparseCategoricalCrossentropy object at 0x7f893a68a6d8>.
  3. Your model “mnist” in Code Cell 3 differs in value “output_shape” on the layer 7 than expected.
  4. We expected [{‘output_shape’: (None, 28, 28, 1), ‘count_params’: 0}, {‘output_shape’: (None, 28, 28, 8), ‘count_params’: 80}, {‘output_shape’: (None, 14, 14, 8), ‘count_params’: 0}, {‘output_shape’: (None, 14, 14, 16), ‘count_params’: 1168}, {‘output_shape’: (None, 7, 7, 16), ‘count_params’: 0}, {‘output_shape’: (None, 7, 7, 32), ‘count_params’: 4640}, {‘output_shape’: (None, 1568), ‘count_params’: 0}, {‘output_shape’: (None, 128), ‘count_params’: 200832}, {‘output_shape’: (None, 10), ‘count_params’: 1290}] and you have (None, 10).
  5. In Code Cell 9 in function tfds.load() we expected to find split=tfds.Split.TEST and could not find it.
  6. In Code Cell 9 we expected to find tfds.load(‘mnist’) function call and could not find it.

After fixing the many silly errors, the grader says ‘Sorry, your submission was incorrect. Please try again. list index out of range’. I tried putting the text in the area where TEXT was asked, but it still returns the same error. How do I troubleshoot this error so that I can submit my work?

Did you find a solution for the ‘list index out of range’ problem?

No, I got started on DataBricks and I never went back to trying to run the code to finish the Specialization. I am pretty sure the code is correct. I never received a response, you are the first person to respond and I told Coursera several times in feedback questionnaires.

Sorry to hear that! If it helps, I was receiving the same feedback: ‘list index out of range’.
I could solve my case. In the “evaluate the model using keras” cell, when integrating the TensorFlow Hub module into a sequential model, I was adding and additional output layer (instead of declaring the output within the hub.KerasLayer)

Hello Emiliano, Thank you so much for the response! I will check the layers again. Just hearing that someone else had the same problem actually does help, I really believed that the site or correction script was broken because I rechecked the code many times. I even looked a other people’s posted code on github (which I dislike doing because I rather figure it out myself) and their code had more errors than my code… Thanks for reassuring me that it was my code and not an error in the correction program. All the best!

Just to let you know, your suggestion fixed the problem. I was adding an additional softmax layer and setting the output in the Hub.KerasLayer…such a silly error. I hope this post helps others who make the same mistake. All the best.

1 Like