We ' ve always known that he could stay in bounds though . Just kidding TWill i love you <| sep |> Glad to have seen that AFTER eating dinner . Ugh . <| sep |> The problem now , is you have the wrong shapes for each of the layers . So , assuming as simple two layer model # self . H hiddenlayersize self . params ' b 1 ' np . zerosself . H # self . C numberofclasses self . params ' b 2 ' np . zerosself . C # where self . D is input size , self . params ' W 1 ' np . random . normal 0 , self . weightscale , self . D , self . H self . params ' W 2 ' np . random . normal 0 , self . weightscale , self . H , self . CWould be all that you need in init The remainder of the code would be added to the following functions def lossself , X , yNoneSo if you have the proper layer shapes and consistent keys ' b 1 ', ' b 2 ', ' W 1 ', ' W 2 ' you should no longer be getting the key errors assuming you create a new classifier .