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
Thanks for sharing about the python implementation of the auction algorithm! I found some bugs in 'auction_lap.py' that actually make the codes output wrong results. I fixed them by myself and attached my codes. I am new to Pytorch. Maybe you can make my revised version better:)
In line 67, (curr_ass.view(-1, 1) == have_bidder.view(1, -1)).sum(dim=1) actually outputs an array containing 0 and 1 instead of the indices of assigned bids. At each round, it actually makes the first two elements of curr_ass be -1. It can be fixed by adding .nonzero() to the tail: (curr_ass.view(-1, 1) == have_bidder.view(1, -1)).sum(dim=1).nonzero()
The case when we only have 1 unassigned bidder at some round needs to be considered. Otherwise, we will get some dimensional errors. In my codes, I simply deal with this case separately.
I also tested my codes by solving a 2D points matching problem via auction algorithm and LP optimization using cvxpy package. They output the same results.
Hi Ben,
Thanks for sharing about the python implementation of the auction algorithm! I found some bugs in 'auction_lap.py' that actually make the codes output wrong results. I fixed them by myself and attached my codes. I am new to Pytorch. Maybe you can make my revised version better:)
In line 67,
(curr_ass.view(-1, 1) == have_bidder.view(1, -1)).sum(dim=1)
actually outputs an array containing 0 and 1 instead of the indices of assigned bids. At each round, it actually makes the first two elements ofcurr_ass
be -1. It can be fixed by adding.nonzero()
to the tail:(curr_ass.view(-1, 1) == have_bidder.view(1, -1)).sum(dim=1).nonzero()
The case when we only have 1 unassigned bidder at some round needs to be considered. Otherwise, we will get some dimensional errors. In my codes, I simply deal with this case separately.
I also tested my codes by solving a 2D points matching problem via auction algorithm and LP optimization using
cvxpy
package. They output the same results.Here is the revised
auction_lap.py
:Here is my testing code:
Best,
Fengyu
The text was updated successfully, but these errors were encountered: