ValueError: Found input variables with inconsistent numbers of samples

Already spent an hour to debug still can’t find what’s wrong here ?
Please help.

Can you share link to your code?


Change small x in code below to capital X

        if display_loss:
            Y_pred = self.sigmoid(self.perceptron(x))

After fixing this, it will throw another error for loss.values()

    if display_loss:

you can fix it by wrapping loss.values() inside list()

    if display_loss:
1 Like

yes its working fine now. Thank you so much for your time. :slight_smile: