Loading

摘要: 1. 查询torch版本号 进入https://pytorch-geometric.com/whl/ 找到对应的torch版本>>点击进入 2. 找到匹配的包 点击下载即可 3. 使用pip离线安装 pip install torch_scatter-2.0.9-cp36-cp36m-linux_x 阅读全文
posted @ 2022-11-27 13:43 _yhwu 阅读(514) 评论(0) 推荐(0) 编辑
摘要: Numpy中默认是使用科学计数法来显示数据的,但是这种做法往往不利于我们观测数据,比如坐标数据等。那么如何取消numpy科学计数法呢,请往下看。 np.set_printoptions() import numpy as np np.set_printoptions(suppress=True) 阅读全文
posted @ 2022-09-19 14:53 _yhwu 阅读(1101) 评论(0) 推荐(0) 编辑
摘要: 第一步,刷新DNS WIN+R 输入cmd 再输入ipconfig/flushdns 第二步,恢复默认 输入netsh winsock reset 重启电脑。 阅读全文
posted @ 2022-05-25 09:27 _yhwu 阅读(568) 评论(0) 推荐(0) 编辑
摘要: Python中报错TypeError: 'int' object is not subscriptable 原因:整形数据中加了下标索引 例如 #python utf-8 a = 10 b = a[0] # error index for value b 正确例子 # python utf-8 a 阅读全文
posted @ 2022-05-22 19:42 _yhwu 阅读(7743) 评论(0) 推荐(0) 编辑
摘要: torch与torchvision版本对应表 torch及torchvision版本号查询 import torch print(torch.__version__) import torchvision print(torchvision.__version__) 阅读全文
posted @ 2022-05-22 15:47 _yhwu 阅读(1714) 评论(0) 推荐(0) 编辑
摘要: python中安装opencv 1.安装opencv-python pip install opencv-python 2.安装opencv-contrib-python pip install opencv-contrib-python 测试是否安装成功 import cv2 阅读全文
posted @ 2022-05-20 09:47 _yhwu 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 训练YOLOX时报错 ModuleNotFoundError:No module named 'past' 解决方法 使用pip安装对应的package:future pip install future 安装成功后既可解决上述问题。 阅读全文
posted @ 2022-05-17 09:44 _yhwu 阅读(379) 评论(0) 推荐(0) 编辑
摘要: Python处理图像数据时通常需要对图像文件进行读取、保存等操作,因此将现有的方法归纳了一下。 1. PIL 依赖包:Pillow 安装:pip install Pillow 源码: 1 import numpy as np 2 from PIL import Image 3 import matp 阅读全文
posted @ 2022-01-23 11:07 _yhwu 阅读(434) 评论(0) 推荐(0) 编辑
摘要: endswith()方法 利用文件名或路径名对文件后缀进行判断,例如对文件名后缀是否为.jpg的文件进行判断。 path = "file.jpg" bool = path.endswith(".jpg") print(bool) 输出即为判断的结果:True 阅读全文
posted @ 2022-01-10 15:09 _yhwu 阅读(4335) 评论(0) 推荐(0) 编辑
摘要: TensorFlow tf.keras.callbacks.EarlyStopping 当模型训练次数epoch设置到100甚至更大时,如果模型的效果没有进一步提升,那么训练可以提前停止,继续训练很可能会导致训练过拟合,而EarlyStopping就是用来提前结束训练的。 参数 描述 monitor 阅读全文
posted @ 2021-12-22 14:03 _yhwu 阅读(1209) 评论(0) 推荐(0) 编辑