pykan
pykan copied to clipboard
methods default lr unless specified
The argument for the init method is lr=1 which is okay for LBFGS. However, Adam won't function well with such high lr. lr=1 is the default learning rate in LBFGS itself (while Adam's lr = 0.001). Instead, the argument in init is lr=None and extra lines in the code to change the lr if it's actually provided. It doesn't change the flow but ensures that Adam will work correctly if the user forgets to change the lr.