EPS=10e-7classLayer(object):defforward(self,h):""" Perform a forward step for the given layer and returns the result # Argument h: np.array of the previous layer # Return np.array of the activation """defbackward(self,grad):""" Perform the backpropagation of the layer. This method updates weights if necessary # Argument grad: np.array of the incoming gradient # Return np.array of the calculated gradient """