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
For the first time, I tried to used custom costs in Geomloss to compute W_p distances with general p.
Using the "online" backend, I constructed a Loss with the following f-string as a cost : cost = f"(Powf(Scalprod(X-Y,X-Y),{p/2}) / {p})"
For p=2, this gives cost = "(Powf(Scalprod(X-Y,X-Y),1.0) / 2)".
However, this fails with an attribute error :
File "/home/gfo/anaconda3/envs/ot-geomloss/lib/python3.9/site-packages/keopscore/formulas/VectorizedScalarOp.py", line 12, in dims = set(arg.dim for arg in args) AttributeError: 'float' object has no attribute 'dim'
The same error occurs using the expended exp( a log(b) ) instead of pow(b,a).
Am I doing something wrong ? Is this going to be addressed in the upcoming release ?
Best regards,
The text was updated successfully, but these errors were encountered:
Hi,
For the first time, I tried to used custom costs in Geomloss to compute W_p distances with general p.
Using the "online" backend, I constructed a Loss with the following f-string as a cost : cost = f"(Powf(Scalprod(X-Y,X-Y),{p/2}) / {p})"
For p=2, this gives cost = "(Powf(Scalprod(X-Y,X-Y),1.0) / 2)".
However, this fails with an attribute error :
File "/home/gfo/anaconda3/envs/ot-geomloss/lib/python3.9/site-packages/keopscore/formulas/VectorizedScalarOp.py", line 12, in dims = set(arg.dim for arg in args) AttributeError: 'float' object has no attribute 'dim'
The same error occurs using the expended exp( a log(b) ) instead of pow(b,a).
Am I doing something wrong ? Is this going to be addressed in the upcoming release ?
Best regards,
The text was updated successfully, but these errors were encountered: