Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of loss function #18

Open
whaot opened this issue Oct 23, 2024 · 1 comment
Open

Implementation of loss function #18

whaot opened this issue Oct 23, 2024 · 1 comment

Comments

@whaot
Copy link

whaot commented Oct 23, 2024

In addition to cross entropy loss, there are also 2 regularization terms for KAN model.
Regularization loss is defined for class KAN_Convolutional_Layer in kan_convolutional/KANConv.py.
def regularization_loss(self, regularize_activation=1.0, regularize_entropy=1.0): return sum( layer.regularization_loss(regularize_activation, regularize_entropy) for layer in self.layers)
However, in experiment_28x28.ipynb, only cross-entropy loss seems to work.
criterion_KKAN_Convolutional_Network = nn.CrossEntropyLoss()
Is it because I missed something?

@AlexBodner
Copy link
Collaborator

Excuse us, the regularization is implemented in another branch (the one called regularization loss), but now it has been outdated because of recent changes that we've done. With some minor tweaks it should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants