-
Notifications
You must be signed in to change notification settings - Fork 191
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
Bug in GAMNET #197
Comments
Hi @bbb801 Could you please modify the dynamic memory into: # dynamic memory
DM_keys = queries[:, :-1, :]
DM_values = prev_drugs[:, :-1, :] which would make the code runs through. These two lines mean that we use the drugs from visit 1 to visit N-1, so the DM_keys and DM_values should both have The above is for the GAMENetLayer class. Also, we have improved the GAMENet class, which replaces the target calculation blocks: # previous block
curr_drugs = [p[-1] for p in drugs_hist]
curr_drugs = batch_to_multihot(curr_drugs, label_size)
curr_drugs = curr_drugs.to(self.device)
# new block
curr_drugs = self.prepare_labels(drugs, self.label_tokenizer) Please refer to our current new master branch. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dear Sir/Madam,
When I run 'drug_recommendation_mimic4_gamenet.py' in tutorials, I get an error.
It seems it can be addressed like in the following figure. Please have a look.
The text was updated successfully, but these errors were encountered: