MultiHopKG
MultiHopKG copied to clipboard
tensors used as indices must be long, byte or bool tensors
error occurs when I train model using UMLS dataset
Epoch 2: average training loss = -0.22322563640773296 entropy = 4.2052984714508055
=> saving checkpoint to '/content/MultiHopKG-master/model/umls-point.rs.conve-xavier-n/a-200-200-3-0.001-0.1-0.0-0.95-400-0.05/checkpoint-2.tar'
0% 0/11 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/content/MultiHopKG-master/src/experiments.py", line 765, in
Does anyone meet that?
The type of elements in offset is float indeed.
search for action_beam_offset = action_ind / action_sapce_size and top_unique_beam_offset = top_unique_idx / action_sapce_size and then modify them to action_beam_offset = action_ind // action_sapce_size and top_unique_beam_offset = top_unique_idx // action_sapce_size This change can works and I see it in DacKGR, but I am not sure if it's right.
搜索action_beam_offset = action_ind / action_sapce_size和top_unique_beam_offset = top_unique_idx / action_sapce_size然后将它们修改为action_beam_offset = action_ind // action_sapce_size和top_unique_beam_offset = top_unique_idx // action_sapce_size 此更改可以工作,我在DacKGR中看到它,但我不确定它是否正确。
Which file is this line of code in? Do you mind telling me? I can't find this line of code. action_beam_offset = action_ind / action_sapce_size和top_unique_beam_offset = top_unique_idx / action_sapce_size
action_beam_offset = action_ind / action_sapce_size (src/rl/graph_search/beam_search.py line:62) top_unique_beam_offset = top_unique_idx / action_sapce_size (src/rl/graph_search/beam_search.py line:105)
action_beam_offset = action_ind / action_sapce_size (src/rl/graph_search/beam_search.py 行:62) top_unique_beam_offset = top_unique_idx / action_sapce_size (src/rl/graph_search/beam_search.py 行:105)
Thank you for your help. I found it. Thank you