You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
if len(y_pred[0]) > 1:
print("doing multiclass classification...")
# We have to reshape our predictions to get them ready for plotting
y_pred = np.argmax(y_pred, axis=1).reshape(xx.shape)
else:
print("doing binary classifcation...")
y_pred = np.round(y_pred).reshape(xx.shape) #rounding to give us a 0 or 1
When I check len(y_pred[0]) which comes from y_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
The text was updated successfully, but these errors were encountered:
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 :)
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
The text was updated successfully, but these errors were encountered: