Broadcast Error

ValueError: operands could not be broadcast together with shapes (105,4) (105,3) 

in line :
--> 101 self.gradients["dA2"] = self.H2 - Y # (N ,4) - (N ,4) , Y is supposed to be (N, 4) but its shape is (105, 3)

NoteBook Link
(Overfitting and Regularization section)

Hi @Anand_Deep,
According to you, Y_oh_en should have a shape of (N,4) ?
How is it possible, given that the number of labels are just 3, when we do a One-Hot encoding of Y, it will always be (N,3).

Thats what instructor told in video ,please tell the solution.
The shape of gradients should have been same, why this problem is arising :confused:
ie, if self.H2 is (N, 3) , Y is also (N, 3)

Yes, i think H2 should be (N,3), but it’s (N,4) due to which this problem is occurring.