You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello author @GanjinZero, first of all I am interested with your research and I'd like to implement it to MIMIC-IV dataset. I use gensim 4.3.2 and now I'm getting error as in title. The error show in line 449, or the load_embeddings function where there is a function new_W.append(model.__getattr__(id2word[i])). The complete error is shown below.
`During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/media/noel-hito/Main/JOBS/Serenic.ai/MSM-Network/ICD-MSMN/main.py", line 248, in
main()
File "/media/noel-hito/Main/JOBS/Serenic.ai/MSM-Network/ICD-MSMN/main.py", line 245, in main
run(args)
File "/media/noel-hito/Main/JOBS/Serenic.ai/MSM-Network/ICD-MSMN/main.py", line 55, in run
model = generate_model(args, train_dataset).to(accelerator.device)
File "/media/noel-hito/Main/JOBS/Serenic.ai/MSM-Network/ICD-MSMN/train_utils.py", line 206, in generate_model
model = IcdModel(word_config, combine_config,
File "/media/noel-hito/Main/JOBS/Serenic.ai/MSM-Network/ICD-MSMN/model/icd_model.py", line 39, in init
self.encoder = TextEncoder(word_config, combine_config)
File "/media/noel-hito/Main/JOBS/Serenic.ai/MSM-Network/ICD-MSMN/model/text_encoder.py", line 16, in init
self.word_encoder = Word_Encoder(self.word_config)
File "/media/noel-hito/Main/JOBS/Serenic.ai/MSM-Network/ICD-MSMN/model/word_encoder.py", line 21, in init
W = torch.Tensor(load_embeddings(self.word_embedding_path))
File "/media/noel-hito/Main/JOBS/Serenic.ai/MSM-Network/ICD-MSMN/data_util.py", line 449, in load_embeddings
new_W.append(model.getattr(id2word[i]))
AttributeError: 'Word2Vec' object has no attribute '__ getattr __' . Did you mean: ' __ setattr __'?`
Hopefully you have an inkling as to why is this happen. Thank you.
The text was updated successfully, but these errors were encountered:
Hello author @GanjinZero, first of all I am interested with your research and I'd like to implement it to MIMIC-IV dataset. I use gensim 4.3.2 and now I'm getting error as in title. The error show in line 449, or the load_embeddings function where there is a function
new_W.append(model.__getattr__(id2word[i]))
. The complete error is shown below.`During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/media/noel-hito/Main/JOBS/Serenic.ai/MSM-Network/ICD-MSMN/main.py", line 248, in
main()
File "/media/noel-hito/Main/JOBS/Serenic.ai/MSM-Network/ICD-MSMN/main.py", line 245, in main
run(args)
File "/media/noel-hito/Main/JOBS/Serenic.ai/MSM-Network/ICD-MSMN/main.py", line 55, in run
model = generate_model(args, train_dataset).to(accelerator.device)
File "/media/noel-hito/Main/JOBS/Serenic.ai/MSM-Network/ICD-MSMN/train_utils.py", line 206, in generate_model
model = IcdModel(word_config, combine_config,
File "/media/noel-hito/Main/JOBS/Serenic.ai/MSM-Network/ICD-MSMN/model/icd_model.py", line 39, in init
self.encoder = TextEncoder(word_config, combine_config)
File "/media/noel-hito/Main/JOBS/Serenic.ai/MSM-Network/ICD-MSMN/model/text_encoder.py", line 16, in init
self.word_encoder = Word_Encoder(self.word_config)
File "/media/noel-hito/Main/JOBS/Serenic.ai/MSM-Network/ICD-MSMN/model/word_encoder.py", line 21, in init
W = torch.Tensor(load_embeddings(self.word_embedding_path))
File "/media/noel-hito/Main/JOBS/Serenic.ai/MSM-Network/ICD-MSMN/data_util.py", line 449, in load_embeddings
new_W.append(model.getattr(id2word[i]))
AttributeError: 'Word2Vec' object has no attribute '__ getattr __' . Did you mean: ' __ setattr __'?`
Hopefully you have an inkling as to why is this happen. Thank you.
The text was updated successfully, but these errors were encountered: