Skip to content

Commit

Permalink
update predict_image to use correct argument name
Browse files Browse the repository at this point in the history
img is being pulled from the wrong context. The intent is to use the argument passed to predict_image.
  • Loading branch information
Resseguie authored Aug 11, 2021
1 parent a44965c commit 2fe9a68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 05b - Convolutional Neural Networks (Tensorflow).ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@
"def predict_image(classifier, image):\n",
" from tensorflow import convert_to_tensor\n",
" # The model expects a batch of images as input, so we'll create an array of 1 image\n",
" imgfeatures = img.reshape(1, img.shape[0], img.shape[1], img.shape[2])\n",
" imgfeatures = image.reshape(1, image.shape[0], image.shape[1], image.shape[2])\n",
"\n",
" # We need to format the input to match the training data\n",
" # The generator loaded the values as floating point numbers\n",
Expand Down Expand Up @@ -430,4 +430,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}

0 comments on commit 2fe9a68

Please sign in to comment.