Possibility of non-square map
ringochuchudull opened this issue · comments
Hi All,
I have attempted to use the repo to perform neural A* search on a rectangle like graph with size (8, 1, 32, 64). However it seems that 'get_heuristic' will output an einsum error. I am wondering if there's any potential fix to this problem
Hi, thanks for your comment!
In fact the current implementation assumes input images to be square.
But extending it to non-square maps wouldn’t be that hard. I believe that specifying size1, size2 = goal_maps.shape[-2], goal_maps.shape[-1]
and fixing the following two lines will solve the problem for the get_heuristic function.
neural-astar/src/neural_astar/planner/differentiable_astar.py
Lines 39 to 40 in 719b579
I will fix it in the next update. Thank you!
Now supported by #18