Skip to content

07_Milestone project predictions #148

Answered by gauravreddy08
Natali-bali asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @Natali-bali

I assume that your working on FoodVision Milestone Project, if that's the case, here's the reason you're facing that issue.

Initially, when we import the dataset from Tensorflow Datasets Module we shuffle it. So every time you try to access test_data variable it gets shuffled. Hence why, your models predictions and the ground-truth values don't match.

Solution

You can simply get rid of shuffling in test_data by setting shuffle=False (only for test_data), and it wont affect the model's accuracy.

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
9 replies
@gauravreddy08
Comment options

@MuhammadAwon
Comment options

@MuhammadAwon
Comment options

@gauravreddy08
Comment options

@MuhammadAwon
Comment options

Answer selected by mrdbourke
Comment options

You must be logged in to vote
1 reply
@gauravreddy08
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants