Cysu / open-reid

Open source person re-identification library in python
https://cysu.github.io/open-reid/
MIT License
1.34k stars 349 forks source link

TypeError: Can't instantiate abstract class Euclidean with abstract methods get_metric, score_pairs #87

Closed SWRDFK closed 4 years ago

SWRDFK commented 4 years ago

Thanks for your excellent work! I met this problem when I run the file examples/softmax_loss.py.

Traceback (most recent call last): File "softmax_loss.py", line 217, in main(parser.parse_args()) File "softmax_loss.py", line 104, in main metric = DistanceMetric(algorithm=args.dist_metric) File "/home/open-reid/reid/dist_metric.py", line 13, in init self.metric = get_metric(algorithm, *args, *kwargs) File "/home/open-reid/reid/metric_learning/init.py", line 25, in get_metric return __factory[algorithm](args, **kwargs) TypeError: Can't instantiate abstract class Euclidean with abstract methods get_metric, score_pairs

mxl1990 commented 4 years ago

Thanks for your excellent work! I met this problem when I run the file examples/softmax_loss.py.

Traceback (most recent call last): File "softmax_loss.py", line 217, in main(parser.parse_args()) File "softmax_loss.py", line 104, in main metric = DistanceMetric(algorithm=args.dist_metric) File "/home/open-reid/reid/dist_metric.py", line 13, in init self.metric = get_metric(algorithm, *args, *kwargs) File "/home/open-reid/reid/metric_learning/init.py", line 25, in get_metric return __factory[algorithm](args, **kwargs) TypeError: Can't instantiate abstract class Euclidean with abstract methods get_metric, score_pairs

What do you do to solve this problem