DEC-Keras icon indicating copy to clipboard operation
DEC-Keras copied to clipboard

ValueError: too many values to unpack (expected 2)

Open chi-an1997 opened this issue 2 years ago • 2 comments

Hi, thanks for your code. While runing the code it happend a error. image Do anyone know hoe to solve it ? Thanks a lot

chi-an1997 avatar Mar 04 '22 12:03 chi-an1997

Same problem

NG-Bullseye avatar Jun 09 '22 20:06 NG-Bullseye

I had this issue. It was because the linear_assignment import from sklearn is depracated and I had replaced it with the scipy equivalent, which is not quite the same. I fixed it by using this version which I got from here

def linear_assignment(cost_matrix):
  try:
    import lap
    _, x, y = lap.lapjv(cost_matrix, extend_cost=True)
    return np.array([[y[i], i] for i in x if i >= 0])
  except ImportError:
    from scipy.optimize import linear_sum_assignment
    x, y = linear_sum_assignment(cost_matrix)
    return np.array(list(zip(x, y)))

DrJonnyT avatar Apr 05 '23 16:04 DrJonnyT