bqth29 / simulated-bifurcation-algorithm

Python CPU/GPU implementation of the Simulated Bifurcation (SB) algorithm to solve quadratic optimization problems (QUBO, Ising, TSP, optimal asset allocations for a portfolio, etc.).
MIT License
103 stars 25 forks source link

RuntimeError: expected m1 and m2 to have the same dtype, but got: double != float #36

Closed rishi-sreedhar closed 10 months ago

rishi-sreedhar commented 10 months ago

Hi, obtaining this error when trying to change the data type to torch.float64 in the minimize() function. Please help! Thanks!

rishi-sreedhar commented 10 months ago

This is solved using torch.set_default_dtype(torch.float64)