![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
残影飞雪
信息安全
展开
-
UserWarning: size_average and reduce args will be deprecated, please use reduction=‘mean‘
修正代码:).item()原创 2024-07-29 09:10:23 · 192 阅读 · 0 评论 -
_VF.meshgrid(tensors, **kwargs, indexing=“ij“
504行) #原创 2024-07-29 09:09:52 · 198 阅读 · 0 评论 -
Loss.py __int64
intint(原创 2024-07-29 09:09:14 · 261 阅读 · 0 评论 -
设置全局CUDA指定显卡
print("当前设备:",torch.cuda.current_device())原创 2024-07-29 09:08:28 · 215 阅读 · 0 评论 -
Yolov5lite 训练模型转trt
【代码】Yolov5lite 训练模型转trt。原创 2024-07-29 09:07:57 · 202 阅读 · 0 评论 -
Yolov5lite 转 trt
【代码】Yolov5lite 转 trt。原创 2024-07-29 09:07:20 · 178 阅读 · 0 评论 -
‘export_formats‘ from ‘export‘
修改 model/common.py 616行。原创 2024-07-29 09:06:50 · 201 阅读 · 0 评论 -
yolov5 .grad()错误
detect()原创 2024-07-29 09:05:10 · 269 阅读 · 0 评论 -
Upsample‘ object has no attribute‘recompute_scale_factor‘
修改文件行。原创 2024-07-29 09:04:36 · 293 阅读 · 0 评论 -
“Non-ASCII character ‘xe5‘ in file”报错问题
# -*- coding: UTF-8 -*-原创 2024-07-26 16:10:28 · 345 阅读 · 0 评论 -
Ubuntu 18.04 手工安装Python
必须要带--with-ssl,否则pip安装会提示ssl错误。重新安装后,会自动安装到python3下。原创 2024-07-25 14:09:18 · 399 阅读 · 0 评论 -
TypeError: can‘t convert CUDA tensor to numpy
当试图将存储在GPU(cuda)中的张量值转换为numpy时,假设张量变量为x,然后,使用x.numpy()会引发:TypeError: can’t convert CUDA tensor to numpy,这样的错误。修改为:x.cpu().numpy()原创 2024-07-25 14:06:23 · 78 阅读 · 0 评论 -
Jetson报错 No EGL Display nvbufsurftransform
Jetson报错 No EGL Display nvbufsurftransform: Could not get EGL display connection。原创 2024-07-25 14:04:40 · 382 阅读 · 0 评论 -
PYQT native Qt signal is not callable
使用 emit提交。原创 2024-07-24 11:59:20 · 86 阅读 · 0 评论 -
Pyqt5 信号槽跨线程问题
【代码】Pyqt5 信号槽跨线程问题。原创 2024-07-24 11:58:48 · 55 阅读 · 0 评论 -
cv2 绘制中文字符
【代码】cv2 绘制中文字符。原创 2024-07-24 11:58:10 · 60 阅读 · 0 评论 -
ipynb 格式使用jupyter web
pip3 install jupyterlab jupyter-lab http://localhost:8888原创 2024-07-24 11:57:17 · 111 阅读 · 0 评论 -
vidsom 可视化启动命令
python -m visdom.server原创 2024-07-24 11:55:47 · 91 阅读 · 0 评论 -
python 多线程函数的阻塞和非阻塞
【代码】python 多线程函数的阻塞和非阻塞。原创 2024-07-24 11:54:32 · 83 阅读 · 0 评论 -
python 对字符串进行html转义
【代码】python 对字符串进行html转义。原创 2024-07-24 11:54:01 · 97 阅读 · 0 评论 -
python 切换调用程序时路径问题
【代码】python 切换调用程序时路径问题。原创 2024-07-24 11:52:28 · 283 阅读 · 0 评论 -
海康 Python SDK DLL加载后 报错
【代码】海康 Python SDK DLL加载后 报错。原创 2024-07-23 09:29:04 · 244 阅读 · 0 评论 -
python直接调用async函数
loop = asyncio.get_event_loop() result = loop.run_until_complete(xxx()) loop.close()原创 2024-07-23 09:26:52 · 108 阅读 · 0 评论 -
Python实现捕获异常发生的文件和具体行数
【代码】Python实现捕获异常发生的文件和具体行数。原创 2024-07-23 09:25:10 · 310 阅读 · 0 评论 -
pycocotools安装失败
安装C++开发环境即可。原创 2024-07-23 09:24:23 · 261 阅读 · 0 评论 -
PYQT5 用字符串触发事件
exec("self.staInput_%s.setText('%s')" % (key, imsg))原创 2024-07-23 09:22:03 · 292 阅读 · 0 评论 -
Pyinstaller 打包exe
【代码】Pyinstaller 打包exe。原创 2024-07-23 09:19:53 · 80 阅读 · 0 评论 -
Python安装源
注意,simple 不能少, 是 https 而不是 http。pypi 镜像每 5 分钟同步一次。原创 2024-07-23 09:18:37 · 168 阅读 · 0 评论 -
安装PyCuda 报错
export CPATH=$CPATH:/usr/local/cuda-12.2/targets/x86_64-linux/include export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/cuda-12.2/targets/x84_64-linux/lib pip3 install pycuda原创 2024-07-23 09:16:45 · 219 阅读 · 0 评论 -
class 类list和dict 值问题
【代码】class 类list和dict 值问题。原创 2024-07-23 09:15:49 · 227 阅读 · 0 评论 -
scoket监听失败
server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)原创 2024-07-23 09:14:11 · 95 阅读 · 0 评论 -
Tensorflow tf.placeholder() is not compatible
Import tensorflow.compat.v1 as tf原创 2024-07-23 09:11:44 · 81 阅读 · 0 评论 -
cv2.imshow报错
pip install opencv-contrib-python cv2.error: OpenCV(4.1.0) C:\projects\opencv-python\opencv\modules\highgui\src\window.cpp:627: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If y原创 2024-07-23 09:11:02 · 156 阅读 · 0 评论 -
PaddleOCR ‘Tensor.numpy()[0]
或者。原创 2024-07-23 09:09:35 · 219 阅读 · 0 评论 -
Numpy np.float不存在
因为numpy 1.24.0以后不在有了。原创 2024-07-23 09:06:45 · 86 阅读 · 0 评论 -
‘FreeTypeFont‘ object has no attribute ‘getsize‘
pip install Pillow==9.5.0原创 2024-07-22 10:10:18 · 56 阅读 · 0 评论 -
Tensorlfow protoc>=3.19.0
pip uninstall protobuf pip install protobuf==3.19.0原创 2024-07-22 10:08:55 · 91 阅读 · 0 评论 -
Pyserial 找不到模块
Pip uninstall pyserial Pip install pyserial==3.3.0 Pyinstaller hiddenimports=['pyserial'] https://stackoverflow.com/questions/54910208/cant-get-exe-to-execute-on-other-machine-no-module-named-serial-error/73846888#73846888?newreg=52bd2df66aca44c8a32d463aa5原创 2024-07-22 10:05:46 · 136 阅读 · 0 评论 -
Pyinstaller no found modle
pyinstaller sd.py -F -p C:\Python32\Python37\Lib\site-packages;C:\Python32\Python37\Lib\site-packages\sounddevice-0.4.6.dist-info --hidden-import sounddevice原创 2024-07-22 09:58:46 · 73 阅读 · 0 评论 -
Pyinstaller 多进程bug
if __name__ == "__main__": multiprocessing.freeze_support()原创 2024-07-22 09:57:37 · 96 阅读 · 0 评论