python
一只奋进的小蜗牛
这个作者很懒,什么都没留下…
展开
-
RuntimeError: NCCL error in: ../torch/lib/c10d/ProcessGroupNCCL.cpp:859, invalid usage, NCCL version
Traceback (most recent call last): File "tools/train_net.py", line 209, in <module> launch( File "/home/e300/code/detectron2/detectron2/engine/launch.py", line 67, in launch mp.spawn( File "/home/e300/anaconda3/lib/python3.8/site-packag原创 2021-05-25 14:30:28 · 11730 阅读 · 2 评论 -
Kivy Apk build with buildozer error: # Java compiler (javac) not found, please install it
问题:# Check configuration tokens# Ensure build layout# Check configuration tokens# Read available permissions from api-versions.xml# Preparing build# Check requirements for android# Run 'dpkg --version'# Cwd None/bin/sh: dpkg: comando non trovato#原创 2021-04-19 10:10:02 · 1497 阅读 · 0 评论 -
基于python实现MQTT发布订阅过程原理解析
https://94e.cn/info/2726转载 2021-04-02 16:23:32 · 165 阅读 · 0 评论 -
使用python遍历 下载FTP 的所有文件,包含子目录的文件
from ftplib import FTPimport osimport reftp = FTP()ftp.connect('host',port)ftp.login('usr', 'passwd')Server_path = "/opt/test"Client_path="C:\Users\Administrator\Desktop\m_test"sum1 = 0sum2 = 0value = 0FTP_Dir_l = []Ftp_file_l = []if re.searc原创 2021-03-24 14:29:51 · 1994 阅读 · 1 评论 -
Python 使用ftplib切换指定ftp目录不存在则创建目录和上传下载文件
本文主要介绍Python中,使用ftplib指定ftp的帐号和密码,通过ftp.cwd(path)切换ftp上指定path目录,如果不存在目录则在ftp上新建目录,上传文件到ftp服务器和下载文件或整个目录(文件夹)下的文件到本地的方法,以及实现的示例代码。1、ftplib的常用方法1)ftp登陆连接from ftplib import FTP #加载ftp模块ftp=FTP() #设置变量ftp.set_debuglevel(原创 2021-03-24 10:58:09 · 3991 阅读 · 0 评论 -
正则化通俗讲解
参考文章:https://www.zhihu.com/question/20924039转载 2021-01-29 15:09:19 · 1086 阅读 · 0 评论 -
ModuleNotFoundError: No module named ‘cPickle‘
在python2中:import cPickle as pickle在python3中:import pickle as pickle原创 2020-12-09 16:18:41 · 300 阅读 · 0 评论 -
Python安装第三方库报错:“These Packages Do Not Match The Hashes From The Requirements File.“
问题:在安装第三方库时出现报错"These Packages Do Not Match The Hashes From The Requirements File."原因:通常是因为网速问题导致的下载错误,导致对应的哈希值不匹配。解决方法:需要在pip时,添加"–upgrade"参数即可。通常这时下载还会报错timeout,因此多加一个"–default-timeout=100000" 更为保险(timeout的赋值可以视情况变化)。pip install --upgrade --default-ti原创 2020-11-26 17:14:37 · 4879 阅读 · 0 评论 -
Python报错:PermissionError: [Errno 13] Permission denied 解决方案详解
出现错误的原因:1.文件找不到,2.文件被占用,3.文件无权限访问,4.打开的不是文件,而是一个目录原创 2020-11-24 15:55:19 · 5882 阅读 · 3 评论 -
TensorFlow模型测试时遇到内存不足问题
2020-11-04 16:55:57.656543: I tensorflow/stream_executor/cuda/cuda_driver.cc:830] failed to allocate 11.00G (11811160064 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY: out of memory2020-11-04 16:55:57.662293: I tensorflow/stream_executor/cuda/cuda_driver.c原创 2020-11-04 17:25:40 · 1794 阅读 · 2 评论 -
Darknet的yolov3.weights文件转换成tensorflow的ckpt或者pb文件
https://blog.csdn.net/heiheiya/article/details/91437196?utm_medium=distribute.pc_relevant.none-task-blog-title-2&spm=1001.2101.3001.4242转载 2020-11-04 14:53:25 · 889 阅读 · 0 评论 -
Tensorflow 2.0之TF-slim
要在TF2中以兼容的模式使用,你需要把它当作一个包来安装。安装方式:Download Zip。然后,python setup.py install使用方法:#import tensorflow as tfimport tensorflow.compat.v1 as tf#from tensorflow.contrib.slim.nets import vggimport tf_slim as slim...原创 2020-11-04 14:32:45 · 2247 阅读 · 0 评论 -
两种UnboundLocalError: local variable ‘xxx‘ referenced before assignment情况的解决方法
1)在子程序中对全局变量的操作,比如val=9def test(flag): if flag: val = 1 else: print 'Error' return val test(0)错误提示:UnboundLocalError: local variable ‘val’ referenced before assignment解决方法:用global关键字来进行说明该变量是全局变量val=9def test(原创 2020-08-06 16:26:13 · 2739 阅读 · 0 评论