microsoft / otdd

Optimal Transport Dataset Distance
MIT License
156 stars 48 forks source link

ImportError: cannot import name 'embedded_feature_cost' from 'otdd.pytorch.distance' #3

Closed chengrunyang closed 3 years ago

chengrunyang commented 3 years ago

Hi, I get the above error when trying to run the second example in README (first example in Advanced Usage), and I couldn't find where embedded_feature_cost is defined. I've followed the installation instructions in a conda virtual environment. Could you help take a look? Thanks!

dmelis commented 3 years ago

Thanks. The README example was using the old syntax (via functools.partial). Now FeatureCost is a class, so that isn't needed anymore. Fixed the README and added a python script with the advanced example.