KeyError: "Registering two shape functions with name 'NnDistance' !

真是见鬼,编译tf_nndistance_g.cu这些C++ OP都没问题,但是调用就出现了这个问题:KeyError: "Registering two shape functions with name ‘NnDistance’ !。浪费了我好几天,擦!!!
解决方法:
KeyError: "Registering two shape functions with name 'NnDistance' !上面的structural_losses文件夹进行mark source root的话,就需要把structural_losses这个删了。KeyError: "Registering two shape functions with name 'NnDistance' !

如果编译过程没问题的话,出现类似上诉问题都可以这样解决。