Failed test case: incorrect number of dimensions for tensor.
Expected: 4
Got: 5
the previous cell shows correctly (60000,28,28,1) so I guess there should be something in the management of the cell that I do not understand. Any help?
hi @ggdelucca
kindly mention the unittest you failed here is from which exercise number, so we can coorelate with our codes.
Also confirm the course, module/week and assignment name as I couldn’t find any unittest related to dimensionality in the module 3 of this course.
in case when you create a topic, and don’t find the course category match, atleast make sure to add the information in the description section, so moderators can do the correction to your topic.
Regards
DP
The category was incorrect. My mistake. The correct one is “tensorflow developer professional”
But when I tried to correct it I disover that that category in the community was “read only” for me. I do not understand why.
The issue about the grade is on Week 3 weekly assignement on “improving DNN performance..”.
The requirement is to change the dimension of the dataset and the cell test is working fine, but then the test cell reports: "
“Failed test case: incorrect number of dimensions for tensor. Expected: 4 Got: 5”
and I tested the full exercise more than once.
Any suggestion?
I will move this thread to the correct forum.
Tip for the future:
A forum category where you can’t add any new topics is because that’s a top-level topic for a series of courses.
If you click on the sub-topic for a specific course, you should be able to create a new thread there.
in tensorflow developer professional specialisation, can you point out the course you are doing
the mentor selected course 1 category. if you are unsure, please mention the assignment name which will have mention the course and week mentioned in the assignment name.
C1_W3 Improve MNIST with Convolutions
isssue is in
unittests.test_reshape_and_normalize(reshape_and_normalize)
Please click on my name and then message me screenshot of the grade function codes from previous exercises until you got this failed test result
The way you are reshaping images is incorrect.
first of all the recall variable you are using is global variable for dataset images, see the ARGS section, you will know you shouldn’t use training_images.
next to add extra dimension instruction clearly mentions add it to the right most side of the array
so if I have 1000 images of 20 x 20 width and height, to add an extra dimension, I will mention array as
(1000, 20, 20, 1)
Also you have used np.expand_dims as function to reshape your images, that is again incorrect.
Instructions mentions that these images are already tensor so use reshape function to the recall arguments
argument.reshape(1000, 20, 20, 1) Here you argument is the name recall variable mentioned as Args
Thanks. I did left the training_images instead of images when writing the code.
np.expand_dims is correct. it is an accepted alternative to reshape.
yes alternative are many, i only mentioned so in case of autograder is grading according to assigned function use. remember passing test doesn’t confirm one will always pass the submission grader.