python
TechForGood
零零碎碎的记亿点东西
展开
-
pip install torch-scatter
之前有一个项目用到了torch-geometric,但是使用的时候总是遇到问题,然后根据(应该是官网或者啥的),需要依次安装一些依赖,记录一下 pip install --no-index torch-scatter -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html pip install --no-index torch-sparse -f https://pytorch-geometric.com/whl/torch-$原创 2021-03-29 08:44:15 · 1252 阅读 · 0 评论 -
python list转tensor
就自己做个记录 import numpy as np neg_list = [] neg_numpy = np.array(neg_list) neg_tensor = torch.from_numpy(neg_numpy)原创 2021-03-23 20:58:46 · 9004 阅读 · 0 评论 -
【python】Unindent does not match any outer indentation level
今天写代码遇到的Unindent does not match any outer indentation level的异常,搜索了一些解决方案,都跟我的问题不太符合,然后是无意中发现,在这之后的新的function的def前面多打了一个空格。。。原创 2020-09-01 19:46:13 · 207 阅读 · 0 评论