I have a very large assignment problem which takes quite some time on a CPU. I was solving this with the Munkres algorithm in numpy using this scipy code.
I wonder if this is the type of computation which would be greatly sped up by GPU? I would be interested in implementing this code in torch if this would help me. Any thoughts are appreciated, thanks.
Can you share the difficulties you are facing with the above code? Do you want to use the auction algorithm for solving LAP problem?. I can work around a solution if you want.
I am trying to get the best combination of two set of word embeddings. So I basically calculate a similar matrix a[i,j] = similarity(Ei, Ej) and then apply a LAP algorithm.
Traceback (most recent call last):
File "E:/ζζ‘£/code/EAbyRule/graph_completion/auction_lap.py", line 67, in <module>
auction_lap(a)
File "E:/ζζ‘£/code/EAbyRule/graph_completion/auction_lap.py", line 41, in auction_lap
src=bid_increments.view(-1, 1)
RuntimeError: Dimension out of range (expected to be in range of [-1, 0], but got 1)
when the original scipy method outputs the col and rows indices, this method output only one array indices. could this still link to the original one?
thx
@yuri . Yes, It will disconnect the computational graph. I just mentioned it as a fast solution. for End-to-End training you should look for a substiution.