(relation_embed): Embedding(80, 64)
(entity_user_embed): Embedding(184166, 64)
File "D:\Graduate\Codes\Knowledge Graph recommend\KGAT-pytorch-master\main_ecfkg.py", line 116, in train
batch_head, batch_relation, batch_pos_tail, batch_neg_tail = data.generate_kg_batch(data.train_kg_dict, data.train_batch_size, data.n_users_entities)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Graduate\Codes\Knowledge Graph recommend\KGAT-pytorch-master\data_loader\loader_base.py", line 153, in generate_kg_batch
batch_head = random.sample(exist_heads, batch_size)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\SoftWares\Python3.12.0\Lib\random.py", line 413, in sample
raise TypeError("Population must be a sequence. "
TypeError: Population must be a sequence. For dicts or sets, use sorted(d).
(relation_embed): Embedding(80, 64) (entity_user_embed): Embedding(184166, 64) File "D:\Graduate\Codes\Knowledge Graph recommend\KGAT-pytorch-master\main_ecfkg.py", line 116, in train batch_head, batch_relation, batch_pos_tail, batch_neg_tail = data.generate_kg_batch(data.train_kg_dict, data.train_batch_size, data.n_users_entities) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Graduate\Codes\Knowledge Graph recommend\KGAT-pytorch-master\data_loader\loader_base.py", line 153, in generate_kg_batch batch_head = random.sample(exist_heads, batch_size) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\SoftWares\Python3.12.0\Lib\random.py", line 413, in sample raise TypeError("Population must be a sequence. " TypeError: Population must be a sequence. For dicts or sets, use sorted(d).