CharlieMat / GFN4Rec

Source code for paper "Generative Flow Network for Listwise Recommendation"
Apache License 2.0
12 stars 2 forks source link

Optimising UserRequestEncoder #4

Open arjunabeuger opened 5 months ago

arjunabeuger commented 5 months ago

Hi there,

I have read your paper and I'm trying to replicate it using MovieLens. From the text it wasn't entirely clear to me whether you also optimize the UserRequestEncoder separately and if that is the case, would you use the terminal (minibatch) loss for that?

So in the training-loop you would optimise as follows:

# compute gradient
optimizer_theta.zero_grad()
optimizer_phi.zero_grad()
optimizer_ure.zero_grad()

# backprop
minibatch_loss.backward()

# update weights
optimizer_theta.step()
optimizer_phi.step()
optimizer_ure.step()

where theta is the forward model, phi is the flow model and ure is the user-request encoder?

So far I have not been able to train the model with great success (used my own implementation). But I'm wondering if this is what causes it.

Thanks in advance!