Logistic Regression Custom Image

I have been trying to implement the logistic regression model on my own computer, and everything so far as worked just as in the Juypter notebooks. However, the only issue I am running into is the ability to load a custom image to have the model predict as a cat or non cat image. Strangely, for the exact same implementation provided, my code fails. My images work on Juypter but not on my local pc.

Here is the following error I get:

in resize
if self.size == size and box == (0, 0) + self.size:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Moved to DLS Course 1, since its not related to DLS Course 2.

@jldeda, the code is from this notebook, isn’t it?

You’re getting that error because num_px is not a scalar. Check your load_dataset function :slight_smile: