nickgreenquist / cu2rec

CUDA Implementation of Parallel Matrix Factorization Algorithm for Recommender Systems
GNU Affero General Public License v3.0
13 stars 1 forks source link

Create config struct for hyperparameters #15

Closed dorukkilitcioglu closed 5 years ago

dorukkilitcioglu commented 6 years ago

Right now, we're passing a ton of hyperparameters back and forth. We should create a struct that carries all our hyperparameters, including learning rate, regularizing terms, etc.

Also modify the training loop so that we give the regularization param instead of the learning rate to the kernel.

dorukkilitcioglu commented 6 years ago

It might be better to put this into the constant memory of the GPU. Just asked Z about it, we'll see what he has to say.

dorukkilitcioglu commented 6 years ago

Struct is out, constant memory is in.

nickgreenquist commented 5 years ago

woot! go GPU memory constraints!

dorukkilitcioglu commented 5 years ago

Little update: apparently the constant memory accesses need to be in the same file with the declaration. Otherwise, they point to different locations (but don't cause any errors because CUDA). The options seem to be either to put everything that uses the hyperparams into the same file (training, loss, sgd), or do same make magic to tie all of them together at compile time. I'm leaning towards the second one, because it keeps the project more manageable.

dorukkilitcioglu commented 5 years ago

Merged in #19.