KindXiaoming / pykan

Kolmogorov Arnold Networks
MIT License
14.28k stars 1.3k forks source link

Very high GPU usage,please help me!!! #232

Open ZzzTD opened 3 months ago

ZzzTD commented 3 months ago

Excuse me, could you please help me?

I initialized KAN with the following parameters:

    `model = KAN(width=[3, 256,256],grid=5,k=3,seed=0 ,device='cuda' )
     input= torch.randn(256,3)` 

But I found that it will occupy a high amount of graphics memory. How should I optimize this situation? Thank you.

parinavcodes commented 3 months ago

Facing the same issue, did you find any solution?

ZzzTD commented 3 months ago

Facing the same issue, did you find any solution?

Sorry, it hasn't been resolved yet.

FulingChen commented 2 months ago

Same here. Try adding plt.close() for each plot. Even though, I still have the problem when using RepeatedKFold. The model looks taking the memory even after the training.

KindXiaoming commented 1 month ago

please try to update to the most recent code and use the speed mode model = model.speed() https://github.com/KindXiaoming/pykan/blob/master/tutorials/Example_2_speed_up.ipynb