KAN
KAN copied to clipboard
Error running code
Hello. Thank you very much for sharing your KAN neural networks example.
Running the following cell of your regression example notebook
results = model.train(calhous_dataset, opt="LBFGS", device=device, metrics=(train_mse, test_mse), loss_fn=torch.nn.MSELoss(), steps=25, lamb=0.01, lamb_entropy=2., save_fig=True, img_folder=image_folder)
I have encountered this error:
{ "name": "TypeError", "message": "Module.train() got an unexpected keyword argument 'opt'", "stack": "--------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[6], line 13 10 mse = torch.nn.functional.mse_loss(predictions, calhous_dataset['test_label']) 11 return mse ---> 13 results = model.train(calhous_dataset, opt="LBFGS", device=device, metrics=(train_mse, test_mse), 14 loss_fn=torch.nn.MSELoss(), steps=25, lamb=0.01, lamb_entropy=2., save_fig=True, img_folder=image_folder)
TypeError: Module.train() got an unexpected keyword argument 'opt'" }
Best regards.