第一次发帖,不太清楚规范,
在复现该项目时。
https://github.com/dmlc/dgl/tree/master/examples/pytorch/hilander
在照如下整理好项目环境后,运行项目时总出现,版本全都是项目对应版本,但查找多处未查到相关的解决方案,最后也没解决,恳请哪位大佬能不吝赐教!!非常感谢!!
conda create -n Hilander # create env
conda activate Hilander # activate env
conda install pytorch==1.7.0 torchvision==0.8.0 cudatoolkit=10.2 -c pytorch # install pytorch 1.7 version
conda install -y cudatoolkit=10.2 faiss-gpu=1.6.5 -c pytorch # install faiss gpu version matching cuda 10.2
pip install dgl-cu102 # install dgl for cuda 10.2
pip install tqdm # install tqdm
git clone https://github.com/yjxiong/clustering-benchmark.git # install clustering-benchmark for evaluation
cd clustering-benchmark
python setup.py install
cd ../
报错内容:
Namespace(balance=True, batch_size=4096, data_path='data/subcenter_arcface_deepglint_train_1_in_10_recreated.pkl', dropout=0.0, epochs=250, faiss_gpu=True, gat=False, gat_k=1, hidden=512, knn_k='10,5,3', levels='2,3,4', lr=0.01, model_filename='checkpoint/deepglint_sampler.pth', momentum=0.9, num_conv=1, num_workers=0, use_cluster_feat=True, use_focal_loss=False, weight_decay=1e-05)
[faiss gpu] #GPU: 0
[Time] [faiss_gpu] query topk 10 consumes 0.0068 s
[Time] build index consumes 0.0069 s
Using backend: pytorch
Traceback (most recent call last):
File "train_subg.py", line 64, in
dataset = LanderDataset(features=features, labels=labels, k=k,
File "/content/drive/MyDrive/colab/hilander/dataset/dataset.py", line 35, in init
knns = build_knns(features, self.k, 'faiss_gpu')
File "/content/drive/MyDrive/colab/hilander/utils/knn.py", line 83, in build_knns
index = knn_faiss_gpu(feats, k)
File "/content/drive/MyDrive/colab/hilander/utils/knn.py", line 163, in init
dists, nbrs = faiss_search_knn(feats,
File "/content/drive/MyDrive/colab/hilander/utils/faiss_search.py", line 92, in faiss_search_knn
dists, nbrs = faiss_search_approx_knn(query=feat,
File "/content/drive/MyDrive/colab/hilander/utils/faiss_gpu.py", line 106, in faiss_search_approx_knn
index = faiss_index_wrapper(target,
File "/content/drive/MyDrive/colab/hilander/utils/faiss_gpu.py", line 73, in init
index.add_with_ids(target, target_ids)
File "/usr/local/envs/Hilander/lib/python3.8/site-packages/faiss/init.py", line 108, in replacement_add_with_ids
assert d == self.d
AssertionError
Exception ignored in: <function faiss_index_wrapper.__del__ at 0x7fe4882cf700>
Traceback (most recent call last):
File "/content/drive/MyDrive/colab/hilander/utils/faiss_gpu.py", line 80, in del
self.index.reset()
AttributeError: 'faiss_index_wrapper' object has no attribute 'index'
在colab上运行图神经网络相关,其中的faiss库最后显示;faiss_index_wrappe; object has no attribute ;index;
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
0条回答 默认 最新
悬赏问题
- ¥15 电视版的优酷可以设置电影连续播放吗?
- ¥50 复现论文;matlab代码编写
- ¥30 echarts 3d地图怎么实现一进来页面散点数据和卡片一起轮播
- ¥15 数字图像的降噪滤波增强
- ¥15 心碎了,为啥我的神经网络训练的时候第二个批次反向传播会报错呀,第一个批次都没有问题
- ¥15 MSR2680-XS路由器频繁卡顿问题
- ¥15 VB6可以成功读取的文件,用C#读不了
- ¥15 如何使用micpyhon解析Modbus RTU返回指定站号的湿度值,并确保正确?
- ¥15 C++ 句柄后台鼠标拖动如何实现
- ¥15 有人会SIRIUS 5.8.0这个软件吗