Closed donalhill closed 2 years ago
Hey @donalrinho, looks like this is closed, did you solve it?
You could solve it by checking the dimensions of y_pred[0]
.
It depends on the shape of your output predictions.
If you're getting something like:
y_pred = [[0, 1, 0],
[1, 0, 0]...
The above code should work.
If your y_pred
looks different, have a play around with the dimension checking logic to see if you can adjust it for your own use case.
For example, you could check the shape
or ndim
of the output tensor too.
Hey @mrdbourke,
Thanks for getting back to me! The issue was transient it seems, and went away when I reran a bunch of cells. Perhaps it was something silly I did when fiddling with one of the inputs.
Really enjoying your material so far, thank you for providing this resource :)
Cheers, Donal
Hello,
I am working through video 76 on the "TensorFlow Developer Certificate in 2022: Zero to Mastery" course. The function
plot_decision_boundary()
has the following logic:When I check
len(y_pred[0])
which comes fromy_pred = model.predict(x_in)
, I get a length of 2. So the current function then follows the logic for multi-class classification, although the problem being worked on is binary. Can this be fixed?Cheers! Donal