jodie
jodie copied to clipboard
the initial user and item embeddings are learned during training as well?
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?