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

the initial user and item embeddings are learned during training as well? #13

Open
zhaohaixiangbobo opened this issue Feb 25, 2021 · 0 comments

Comments

@zhaohaixiangbobo
Copy link

initial_user_embedding = nn.Parameter(F.normalize(torch.rand(args.embedding_dim).cuda(), dim=0)) # the initial user and item embeddings are learned during training as well
user_embeddings = initial_user_embedding.repeat(num_users, 1)
uers_embeddings.detach_() # Detachment is needed to prevent double propagation of gradient

every epoch ,after the first t-btach the uers_embeddings will detach_(), so each epoch the initial_user_embedding only train one time? total epoch times?

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

1 participant