meshcnn 要求的 环境为torch1.2+cuda10
我用的是torch1.11+cuda11.1也是可以运行的
运行中的错误
TypeError: can‘t convert np.ndarray of type numpy.object_.The only supported types are:
出现在这里
def set_input(self, data):
input_edge_features = torch.from_numpy(edge).float()
原因是array中的数据类型不对,无法转化为torch.tensor,进行一下强制类型转换就可以了更改后为
def set_input(self, data):
edge = data['edge_features'].astype('float')
input_edge_features = torch.from_numpy(edge).float()
更改后还会有类似的错误,都进行强制类型转换就可以正常运行了。