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
Traceback (most recent call last):
File "/home/nudt/linyawei/AStarNet/script/visualize.py", line 175, in
visualize(solver, solver.test_set[i], entity_vocab, relation_vocab, output_file="/home/nudt/linyawei/AStarNet/results.txt")
File "/home/nudt/linyawei/AStarNet/script/visualize.py", line 112, in visualize
paths, weights, num_steps = solver.model.visualize(vis_batch)
File "/home/nudt/anaconda3/envs/astar/lib/python3.10/site-packages/torchdrug-0.2.1-py3.10.egg/torchdrug/tasks/reasoning.py", line 222, in visualize
return self.model.visualize(self.fact_graph, h_index, t_index, r_index)
File "/home/nudt/linyawei/AStarNet/reasoning/model.py", line 404, in visualize
lengths, source_indexes = self.beam_search_length(graph, subgraphs, graph.num_node, h_index, t_index)
File "/home/nudt/linyawei/AStarNet/reasoning/model.py", line 449, in beam_search_length
length[node_out] = sub_length[out_mask]
File "/home/nudt/linyawei/AStarNet/reasoning/data.py", line 81, in setitem
new_values[inverse[len(self.keys):]] = values
RuntimeError: shape mismatch: value tensor of shape [24, 0] cannot be broadcast to indexing result of shape [24, 10]
I have encountered this problem on visualize.py, how do I solve it?
The text was updated successfully, but these errors were encountered:
Traceback (most recent call last):
File "/home/nudt/linyawei/AStarNet/script/visualize.py", line 175, in
visualize(solver, solver.test_set[i], entity_vocab, relation_vocab, output_file="/home/nudt/linyawei/AStarNet/results.txt")
File "/home/nudt/linyawei/AStarNet/script/visualize.py", line 112, in visualize
paths, weights, num_steps = solver.model.visualize(vis_batch)
File "/home/nudt/anaconda3/envs/astar/lib/python3.10/site-packages/torchdrug-0.2.1-py3.10.egg/torchdrug/tasks/reasoning.py", line 222, in visualize
return self.model.visualize(self.fact_graph, h_index, t_index, r_index)
File "/home/nudt/linyawei/AStarNet/reasoning/model.py", line 404, in visualize
lengths, source_indexes = self.beam_search_length(graph, subgraphs, graph.num_node, h_index, t_index)
File "/home/nudt/linyawei/AStarNet/reasoning/model.py", line 449, in beam_search_length
length[node_out] = sub_length[out_mask]
File "/home/nudt/linyawei/AStarNet/reasoning/data.py", line 81, in setitem
new_values[inverse[len(self.keys):]] = values
RuntimeError: shape mismatch: value tensor of shape [24, 0] cannot be broadcast to indexing result of shape [24, 10]
I have encountered this problem on visualize.py, how do I solve it?
The text was updated successfully, but these errors were encountered: