Hello Word!

从此好好码代码。。【专注于计算机视觉和深度学习】
私信 关注
城俊BLOG
码龄10年

从此好好码代码。。

  • 911,178
    被访问量
  • 377
    原创文章
  • 3,098
    作者排名
  • 80
    粉丝数量
  • 于 2010-12-18 加入CSDN
获得成就
  • 获得276次点赞
  • 内容获得236次评论
  • 获得536次收藏
荣誉勋章
TA的专栏
  • Shell
    1篇
  • MxNet
    25篇
  • Docker
    8篇
  • Pytorch
    25篇
  • 计算机视觉
  • 人脸识别
    10篇
  • CV-基础
    86篇
  • 深度学习
  • DL-论文
    2篇
  • DL-数据预处理
    17篇
  • DL-报错
    96篇
  • DL-基础
    67篇
  • Python
    250篇
  • 并行化
    10篇
  • 远程开发 / 监控
    21篇
  • C++
    24篇
  • 正则
    2篇
  • Tensorflow
    2篇
  • 报错
    77篇
  • 可视化
    10篇
  • Linux
    172篇
  • 运维
    47篇
  • Keras
    1篇
  • Dataset
    2篇
  • NVIDIA
    6篇
  • Matlab
    3篇
  • Windows-PPT
  • math
  • 计算机
  • Mobile
    1篇
  • conda
    3篇
  • ML
    4篇
  • leetcode
    4篇
  • 信息资料
  • Windows-实用
    32篇
  • Windows-Excel
    3篇
  • 学习笔记
    70篇
  • 经历
    29篇
  • Web
    12篇
  • 数学基础
    4篇
  • mysql
    2篇
  • .ipnb
    4篇
  • Mac实用
    6篇
  • git
    6篇
  • NLP
    2篇
  • 最近
  • 文章
  • 资源
  • 问答
  • 课程
  • 帖子
  • 收藏
  • 关注/订阅

python list列表和str字符串相互转换

列表转字符串,列表中的每个元素需要是字符串类型>>> a =[ 'a','b']>>> c = '/'.join(a)>>> c'a/b'字符串转列表,>>> c.split('/')['a', 'b']
翻译
0评论
0点赞
发布博客于 昨天

Win10安装打印机驱动搜索不到打印机

很奇怪,打印机IP能ping通,但是安装驱动的时候就是搜索不到。之前电脑里装过这个打印机,但是每次打印在我的电脑上都显示成功,但是却在打印机上看不到任务。打印失败。无奈,准备重新安装打印机驱动(老的没有卸载)但是在安装的时候发现,驱动程序搜索不到这台打印机看了半天也没有什么发现最后,在控制面板里找到之前安装的这台打印机,右键,打印机属性-配置-账号管理-修改了用户识别符由 user1 改为了 iii-user1 (iii是内部域名)终于成功了,在打印的时候能在打印机上看到待打印的任务,刷用户卡
原创
0评论
0点赞
发布博客于 2 天前

局域网window和linux ubuntu之间文件传输 pscp winscp

PSCP (612KB的一个小工具)存为.bat文件,可以在windows下执行@echo off pscp.exe -l hww -pw "user1" -r E:\user1\data\results usr1@10.xxx.xxx.xxx:/home/user1/data/pausewinSCP官网下载使用
原创
0评论
0点赞
发布博客于 5 天前

System.IO.FileNotFoundException: Could not load file or assembly ‘xx.dll‘ or one of its dependencies

fff
原创
0评论
0点赞
发布博客于 6 天前

Win10 Outlook打不开,无法启动Microsoft Outlook。无法打开Outlook窗口。无法打开此文件夹集合。客户端操作失败

重装office是没用的。报错:一直卡在加载配置文件,最后打不开,显示:无法启动Microsoft Outlook。无法打开Outlook窗口。无法打开此文件夹集合。客户端操作失败解决:给OUTLOOK进行重置。按以下步骤操作,每一步完成后确认是否OK,如果已经能打开,无需继续后续步骤重置IE设置 - internet选项 - 常规 - 删除还不行?高级 - 重置删除数据控制面板 - Mail (Microsoft outlook 20xx) - 数据文件 - 删除删除凭据:
原创
0评论
0点赞
发布博客于 12 天前

dlib gpu版安装成功之后报错:dlib.DLIB_USE_CUDA False

按照:https://blog.csdn.net/qxqxqzzz/article/details/111875737安装编译成功了GPU版本的DLIB,但是在PYTHON中使用时出现了问题:(py377) user1@lthpc:/data/user1$ python3.7Python 3.7.7 (default, Mar 26 2020, 15:48:22) [GCC 7.3.0] :: Anaconda, Inc. on linuxType "help", "copyright", "cr
原创
0评论
0点赞
发布博客于 13 天前

linux ubunt16.04 x86_64 安装最新稳定版wine,解决:Unable to locate package winehq-stable

什么破winehq 什么源 都没用。。通通报错:Unable to locate package winehq-stable下载二进制源码安装下载地址:https://dl.winehq.org/wine/source/https://www.winehq.org/announce/5.0.3https://dl.winehq.org/wine/source/5.0/wine-5.0.3.tar.xz安装:根据解压之后得到的README在这里插入代码片...
原创
0评论
0点赞
发布博客于 13 天前

linux ubuntu apt update更新错误:Certificate verification failed: The certificate is NOT trusted. The cer

Ign:16 https://dl.winehq.org/wine-builds/ubuntu xenial InReleaseErr:17 https://download.sublimetext.com apt/stable/ Release Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. The certificate chain uses in
原创
0评论
0点赞
发布博客于 13 天前

dlib调用出错 Invoked with: <dlib.shape_predictor object at 0x7f9cf6d17bb0>, array(

代码:path_to_dlib_model = "dlib_models/shape_predictor_68_face_landmarks.dat"predictor = dlib.shape_predictor(path_to_dlib_model)face_locations = predictor(gray, 1)报错: face_locations = args.predictor(gray, 1)TypeError: __call__(): incompatible func
原创
0评论
0点赞
发布博客于 14 天前

pycharm libcudart.so.8.0: cannot open shared object file: No such file or directory

libcudart.so.8.0: cannot open shared object file: No such file or directory 的解决办法$ sudo ldconfig /usr/local/cuda-10.0/lib64https://blog.csdn.net/qq_38451119/article/details/81007904
翻译
0评论
0点赞
发布博客于 16 天前

Visual Studio 2015 Comunity Update3

https://xinyustudio.wordpress.com/2016/06/29/visual-studio-2015-update-3-offline-installation-iso-download-link/
翻译
0评论
0点赞
发布博客于 16 天前

shell根据文件列表list.txt使用scp拷贝文件和目录结构到远程服务器,远程创建目录

将单个文件拷贝到远程服务器但是希望拷贝(scp命令)到对应的目录(就是文件名的上一层目录, lastDir)下面,保持目录结构如果不存在,则在远程服务器上创建 (ssh命令)自动验证账号密码:$ apt-get install sshpass代码:# usage: sudo sh xxx.shtime=$(date "+%Y%m%d%H%M%S")fdir="/data5/user1/src/images"# divided file list txtsflistDir="/data
原创
1评论
0点赞
发布博客于 16 天前

并行的几种思路

按操作系统windows1.1 同样的代码(如.bat文件),复制多份,手动运行Linux (Ubuntu)2.1 控制并行的数量(如同时运行两个Python脚本;# e. g. script.pyimport caffeimport sys...# 接收命令行参数 cmd = sys.argvsplit = cmd[1]gpu = int(cmd[2])caffe.set_device(gpu)caffe.set_mode_gpu()...运行脚本:#
原创
0评论
0点赞
发布博客于 16 天前

python 简单进度条 tqdm

我觉得比progress.bar.Bar好用安装$ pip install tqdm简单示例pythonPython 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit (AMD64)] on win32Type "help", "copyright", "credits" or "license" for more information.>>> from tqdm import tq
原创
0评论
0点赞
发布博客于 17 天前

ngrok报错 ERR_NGROK_108,ngrok关闭隧道

$ ./ngrok start -config ngrok.yml vnc sshYour account 'j' is limited to 1 simultaneous ngrok client session.Active ngrok client sessions in region 'us': - ts_1xxxxxxxxxxxxxxxx (2000:0000:0000:xxxxxxxxxxxxxxx)ERR_NGROK_108解决:killall ngrok参考:https
翻译
0评论
0点赞
发布博客于 21 天前

cv2.warpPerspective error: (-215:Assertion failed) _src.total() > 0

你传入的矩阵是空的,可能是文件路径不对。重新检查一下。https://github.com/penincillin/DREAM/issues/5
翻译
0评论
0点赞
发布博客于 23 天前

从mxnet .rec文件中解压出图片数组,报错:TypeError: __call__(): incompatible function arguments. The following argum

目的:从mxnet train.rec文件中解压还原出图片数组,送入dlib做人脸检测报错:TypeError: call(): incompatible function arguments. The following argument types are supported:1. (self: _dlib_pybind11.fhog_object_detector, image: array, upsample_num_times: int=0) -> _dlib_pybind11.rec
原创
0评论
0点赞
发布博客于 23 天前

linux ubuntu 18.04 opencv降级、安装opencv3.1

https://gist.github.com/denti/7205065c8f0ce67cf368b9a2d5f76b00
原创
0评论
0点赞
发布博客于 25 天前

linux ubuntu18.04 update-initramfs -u提示The initramfs will attempt to resume from /dev/nvme0n1p3

update-initramfs: deferring update (trigger activated)Processing triggers for initramfs-tools (0.130ubuntu3.11) ...update-initramfs: Generating /boot/initrd.img-5.4.0-48-genericI: The initramfs will attempt to resume from /dev/nvme0n1p3I: (UUID=297bb92
翻译
0评论
0点赞
发布博客于 27 天前

ubuntu 18.04 gcc g++降级

9.x降级到5.x:https://blog.csdn.net/qxqxqzzz/article/details/111875737降级到4.8:$ sudo nano /etc/apt/sources.list# sources.list全部内容:deb http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiversedeb-src http://mirrors.ustc.edu.cn/ubuntu/ .
原创
0评论
0点赞
发布博客于 27 天前

ubuntu18.04 TITAN RTX安装驱动、cuda10 cudnn神报错: ERROR: Unable to load the kernel module ‘nvidia.ko‘

官网下载runfile和patch:cuda_10.0.130_410.48_linux.runcuda_10.0.130.1_linux.run下载cudnncudnn-10.0-linux-x64-v7.6.5.32.tgz关闭xservermoba-xterm右上角关闭x-server$ sudo /etc/init.d/gdm stop$ sudo /etc/init.d/gdm status$ sudo /etc/init.d/lightdm stop$ sudo /etc/.
原创
0评论
0点赞
发布博客于 27 天前

编译caffe ssd

地址:https://github.com/weiliu89/caffe/tree/ssdmake: *** No rule to make target '/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h', needed by '.build_release/cuda/src/caffe/layers/exp_layer.o'. Stop.
原创
0评论
0点赞
发布博客于 28 天前

ubuntu 16.04安装boost, GPU版dlib (cuda9)

# 安装boost# 下载boost: https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz# 解压$ bunzip2 boost_1_66_0.tar.bz2$ sudo tar -xvf boost_1_66_0.tar$ cd boost_1_66_0/# 我使用的是默认路径安装,安装到:/usr/local。其他安装选项见:https://www.boost.org/doc/libs/1_66_
原创
0评论
0点赞
发布博客于 1 月前

人脸姿态

至于是角度是按顺时针转动算还是逆时针转动,没有看到统一说法pitch 俯仰角:绕X轴(指向脸右侧)转动的角度,表现为俯、仰yaw 偏航角:绕Y轴(指向脸下方)转动的角度,表现为向左侧或右侧水平转动roll 滚动角:绕Z轴(指向脸正前)转动的角度,表现为人脸照片旋转https://blog.csdn.net/leilei18a/article/details/108467268...
翻译
0评论
0点赞
发布博客于 1 月前

clion c++ build 报错:fatal error: opencv/cv.h: No such file or directory

In file included from /home/data/downloads/pjs/add_mask/Face_Verification_Test/include/segment/faceSegment.h:4:0, from /home/data/downloads/pjs/add_mask/Face_Verification_Test/src/segment/faceSegment.cpp:1:/home/data/downloads/pjs/add_mas
原创
0评论
0点赞
发布博客于 1 月前

win10 Clion gcc CMake环境初始化Failed to reload报错:gcc.exe: error: language objective-c not recognized

clion从源码新建cmake项目,环境初始化的时候(reload CMakelLists.txt) 时候报错:报错1: g++.exe: error: CreateProcess: No such file or directory报错2: gcc.exe: error: CreateProcess: No such file or directory报错3: gcc.exe: error: language objective-c not recognized这几个错是同时报的。详
原创
1评论
1点赞
发布博客于 1 月前

python文件包含中文执行报错:SyntaxError: Non-ASCII character ‘\xe8‘ in file xxx.py on line xx, but no encoding

SyntaxError: Non-ASCII character '\xe8' in file /data1/xxx/xxx.py on line 11, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details解决:在.py文件的第一行前面加上:# -*- coding: utf-8 -*-
原创
0评论
0点赞
发布博客于 1 月前

apt-get install报错:GnuTLS recv error (-110): The TLS connection was non-properly terminated.

$ sudo apt-get install -y nvidia-docker2...Err:4 https://nvidia.github.io/nvidia-container-runtime/stable/ubuntu16.04/amd64 nvidia-container-runtime 3.4.0-1 GnuTLS recv error (-110): The TLS connection was non-properly terminated.Get:5 https://nvidia
原创
0评论
0点赞
发布博客于 1 月前

sudo apt update报错:E: Problem executing scripts APT::Update::Post-Invoke-Success ‘if /usr/bin/test -w

完整报错:$ sudo apt update...(appstreamcli:27333): GLib-CRITICAL **: g_strchug: assertion 'string != NULL' failed(appstreamcli:27333): GLib-CRITICAL **: g_strchomp: assertion 'string != NULL' failedfree(): double free detected in tcache 2Aborted (core d
翻译
0评论
0点赞
发布博客于 1 月前

sudo apt update报错W: GPG error: http://xxx the public key is not available: NO_PUBKEY

完整报错:$ sudo apt update...W: GPG error: http://files.freeswitch.org/repo/ubuntu-1604/freeswitch-1.6 xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1FDDF413C2B201E5E: The repository 'htt
原创
0评论
0点赞
发布博客于 1 月前

sudo apt get update问题汇总

List item
原创
0评论
0点赞
发布博客于 1 月前

代码不能复现,性能bug排查

python版本原因:py2和py3差别,如除法路径没有修改,如用的对齐之前的原始图片
原创
0评论
0点赞
发布博客于 1 月前

python2 python3 random.sample区别:TypeError: Population must be a sequence or set. For dicts, use lis

报错:TypeError: Population must be a sequence or set. For dicts, use list(d).完整报错:>>> random.sample(a.values(),1)Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/user1/miniconda3/envs/py377/lib/p
原创
1评论
0点赞
发布博客于 1 月前

python函数可变参数:*args和**kwargs 区别和用法

简单记录,如不完善请提醒我# *args 直接传入值def aaa(b,c,*args): if 'd' in args: print('d!') # **kwargs 传入dict def bbb(d,e,**kwargs): if 'f' in kwargs.keys(): print('f!!') if __name__ == '__main__': aaa(1,2,'d') bbb
原创
0评论
0点赞
发布博客于 1 月前

python查找一个字符串是否包含字符列表中的所有字符,并且连续(可重复)

python查找一个字符串是否包含字符列表中的所有字符,并且连续(可重复)。如果满足,返回首个字符出现的位置如果不满足,返回-1#coding=utf-8def judge(c,s): for i in c: try: assert i in s except: return -1 slist = [] for i in s: slist.append(i) c.sort(
原创
0评论
0点赞
发布博客于 1 月前

python cv2图片处理:透明、叠加、画点、外接矩形、掩模操作(抠图,黑色背景变透明白色)、去背景

xxx
原创
0评论
0点赞
发布博客于 1 月前

人脸检测和对齐,关键点坐标仿射变换

https://docs.opencv.org/3.4/d4/d61/tutorial_warp_affine.html
原创
0评论
0点赞
发布博客于 1 月前

人脸识别数据集和特点

名称ID图像成分介绍umdface8277367888西方名人https://arxiv.org/pdf/1611.01484.pdfwebface10575494414非名人
原创
0评论
0点赞
发布博客于 1 月前

pytorch 1.7训练保存的模型在1.4低版本无法加载:frame #63: <unknown function> + 0x1db3e0 (0x55ba98ddd3e0 in /data/user

pytorch 1.7高版本训练保存的模型在1.4低版本无法加载,报错:torch.load('/home/user1/model_best_b.pth.tar')Traceback (most recent call last): File "/data/user1/pkgs/conda/envs/drc/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3417, in run_code exec(co
原创
0评论
0点赞
发布博客于 1 月前

mxnet ndarray ValueError: setting an array element with a sequence.

ValueError: setting an array element with a sequence.详细:Traceback (most recent call last): File "C:\Program Files\JetBrains\PyCharm 2020.2.1\plugins\python\helpers\pydev\pydevd.py", line 1448, in _exec pydev_imports.execfile(file, globals, locals)
原创
0评论
0点赞
发布博客于 1 月前

mxnet src/imperative/./imperative_utils.h:72: Check failed: inputs[i]->ctx().dev_mask() == ctx.dev_m

mxnet 1.6 自定义OP (计算metric)训练报错:src/imperative/./imperative_utils.h:72: Check failed: inputs[i]->ctx().dev_mask() == ctx.dev_mask() (1 vs. 2) : Operator broadcast_add require all inputs live on the same context. But the first argument is on gpu(0) while
原创
0评论
0点赞
发布博客于 1 月前

undefined symbol: PyFPE_jbuf

ImportError: /usr/local/lib/python2.7/dist-packages/scipy/_lib/_ccallback_c.so: undefined symbol: PyFPE_jbufImportError: /usr/local/lib/python2.7/dist-packages/menpo/transform/piecewiseaffine/fastpwa.so: undefined symbol: PyFPE_jbuf重新安装一下报错的包,scipy报错
原创
0评论
0点赞
发布博客于 1 月前

Python文件写入方式:w+和a+

w+和a+的区别:w+: 可读可写,覆盖写!!若文件不存在,创建。注意这里的 + 号并不是追加。每次写完会覆盖上一次的!a+: a+r 可追加可写,文件若不存在就创建
原创
0评论
0点赞
发布博客于 1 月前

pip联网问题 SSLError(SSLError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:748

有时候你在conda中使用pip,即使在pip.conf中设置了trusted-host,还是不起作用,连不上网:$ pip search absl-pyWARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the un
原创
0评论
0点赞
发布博客于 1 月前

python ImportError: cannot import name ‘xxx‘ from ‘xxx‘ (/home/xxx.py)

仔细检查,啥也没写错,文件和函数就在那里,但就是import不了。发生这种情况可能是因为循环引用。
原创
0评论
1点赞
发布博客于 1 月前

Pytorch按照固定顺序加载样本

继承 torch.utils.data.Dataset 类num_workers设置为0shuffle=Falsesampler使用 SequentialSamplerclass CelebA(data.Dataset): xxxfrom torch.utils.data.sampler import SequentialSamplerdatasetC = CelebA(cDir, cImgDir[i], testAnn, transforms.Compose([transfor.
原创
0评论
0点赞
发布博客于 1 月前

pytorch AttributeError: ‘_IncompatibleKeys’ object has no attribute ‘eval’

哥们,你这个模型load_state_dict加载参数之后是不会将模型作为返回值的。所以你不要去接收返回参数。只是load_state_dict就可以了。错误的代码:# 这里你用列表接收了load_state_dict的返回值,但它其实不是load_state_dict之后得到的模型,而是一个_IncompatibleKeys的什么鬼models = [m.load_state_dict(ckpts[i]['state_dict']) for i,m in enumerate(models)]正确
原创
0评论
0点赞
发布博客于 1 月前

ubuntu mxnet joint training 机器反复重启

ubuntu 18.04LTS迭代4000/6000 batch之后就会自动重启从CPU温度,显卡温度等方面没有看出来原因
原创
0评论
0点赞
发布博客于 1 月前

linux ubuntu硬盘数据丢失

ubuntu 18.04开机之后发现一个机械硬盘挂载的文件夹下是空的。以为数据丢了,慌得一批后来发现是开机没有挂载上。有惊无险开机硬盘两种挂载方式:/etc/fstab和/etc/rc.local区别:fstab文件中的记录的硬盘如果挂载不成功就会造成开机失败,但是rc.local不影响原因:机器反复重启损坏了磁盘,导致挂载失败解决:修复一下$ fsck /dev/sda1其他:查看硬盘挂载目录树:$ lsblk逐行查看硬盘$ fdisk -l | more...
原创
0评论
0点赞
发布博客于 1 月前

时间就是生命啊C++

Mat拷贝构造初始化:https://blog.csdn.net/guduruyu/article/details/66973415
翻译
0评论
0点赞
发布博客于 2 月前

mxnet OSError: libnvrtc.so.11.0: cannot open shared object file: No such file or directory

import mxnet报错:Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/user1/.local/lib/python3.6/site-packages/mxnet/__init__.py", line 23, in <module> from .context import Context, current_context, c
原创
0评论
0点赞
发布博客于 2 月前

cudnn8.0.5 /sbin/ldconfig.real: /usr/local/cuda/lib64/libcudnn_cnn_infer.so.8 is not a symbolic link

$ sudo ldconfig /usr/local/cuda/lib64 报一堆错 /sbin/ldconfig.real: /usr/local/cuda/lib64/libcudnn_cnn_infer.so.8 is not a symbolic link/sbin/ldconfig.real: /usr/local/cuda/lib64/libcudnn_ops_infer.so.8 is not a symbolic link/sbin/ldconfig.real: /usr/lo
翻译
0评论
0点赞
发布博客于 2 月前

docker load Error processing tar file(exit status 1): write xxx layer.tar: no space left on device

Error processing tar file(exit status 1): write /feb71c851eeaa5f74ee94a1be3a399915b7d3433bc6ff8fa5ea8a67fea0b4643/layer.tar: no space left on device解决:# 看一下存储位置$ sudo docker info # 改一下存储位置$ sudo nano /etc/docker/daemon.json# 重新加载$ sudo systemctl .
原创
1评论
0点赞
发布博客于 2 月前

mx.metric.CrossEntropy()里面的坑

默认加了一个非常小的常数,为了防止求对数的时候,真数部分为0,一般输入时不受影响。但当输入非常小的时候,输出变化非常大。以下两段代码在一般输入(概率值不是极其小)时等效。from mxnet import ndloss = nd.mean(-nd.pick(prob, label).log())和ce = mx.metric.CrossEntropy()ce.update(global_label, prob_softmax)loss = ce.get()[1]在输入极其小时,不等效。
原创
0评论
0点赞
发布博客于 2 月前

CV基础MX

MAP每个类别的 平均precisionAP:PR曲线下的面积precision和recall公式 含义precision:所有实际预测为正的结果里面(TP+FP),真正正确的有多少(TP)recall:所有应该预测为正的结果里面(TP+FN),真正正确有多少(TP)为什么只关注TP,难道负样本不重要吗??目标检测不关注负样本,负样本是背景实现random crop不超过边界R50结构详细Alexnet结构详细如何解决快慢动作适应,漏帧、漏动作ROCTAR TPR F..
原创
0评论
0点赞
发布博客于 2 月前

mingw-w64 win10安装

网上说的教程不管用,在线下载安装(使用installer)容易报错。不如下载整个离线包。
翻译
0评论
0点赞
发布博客于 2 月前

python2 python3除法区别

唯一差别是对 ‘/’ 处理不同。’/'在PY2中结果既可以取整,又可以带小数。取决于除数或被除数中是否有小数。在PY3中结果都是带小数。# PY2# / 结果既可以取整,也可以带小数Python 2.7.12 (default, Apr 15 2020, 17:07:12)[GCC 5.4.0 20160609] on linux2Type "help", "copyright", "credits" or "license" for more information.>>>
原创
0评论
0点赞
发布博客于 2 月前

python2 python3文件读写 write区别 TypeError: a bytes-like object is required, not ‘str‘

Traceback (most recent call last): File "test.py", line 266, in <module> f.write(tpr_data)TypeError: a bytes-like object is required, not 'str'
翻译
0评论
0点赞
发布博客于 2 月前

python3 和 python2的cmp sort lambda函数 报错

Traceback (most recent call last): File "test.py", line 222, in <module> negative_pair_sim.sort(lambda x, y: cmp(x[3], y[3]), reverse=True)TypeError: sort() takes no positional arguments代码:negative_pair_sim.sort(lambda x, y: cmp(x[3], y[3])
原创
0评论
0点赞
发布博客于 2 月前

PrettyTable TypeError: can only concatenate list (not “map“) to list

Traceback (most recent call last): File "test.py", line 157, in <module> tpr_fpr_table = PrettyTable(['Models'] + map(str, x_labels))TypeError: can only concatenate list (not "map") to list
原创
0评论
0点赞
发布博客于 2 月前

docker run之后容器自动退出?

run的时候加上参数 -ti,(交互模式)。详见:https://blog.csdn.net/qxqxqzzz/article/details/89705202
原创
0评论
0点赞
发布博客于 2 月前

安装vs code时snap联网报错:error: cannot install “code“: Post https://api.snapcraft.io/v2/snaps/refresh: dia

安装vs code$ sudo snap install --classic code[sudo] password for xxx:error: cannot install "code": Post https://api.snapcraft.io/v2/snaps/refresh: dial tcp: lookup api.snapcraft.io on [::1]:53: read udp [::1]:54060->[::1]:53: read: connec
翻译
0评论
0点赞
发布博客于 2 月前

用于Multi-task Learning:诡异的MxNet

1,symbol命名方式:metric的名字和loss的名字要对应,否则报错:Traceback (most recent call last): File "/home/user1/arcface-mtl/recognition/train_1118.py", line 390, in <module> main() File "/home/user1/arcface-mtl/recognition/train_1118.py", line 386, in main
原创
0评论
0点赞
发布博客于 2 月前

moba xterm ssh Gtk-WARNING cannot open display:

将ssh abc@server:port命令改为ssh -X abc@server:port
原创
0评论
0点赞
发布博客于 2 月前

ubuntu18.04安装docker, nvidia-docker

安装docker: https://www.runoob.com/docker/ubuntu-docker-install.html安装nvidia-docker: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker其他:win10安装dockerUbuntu18.04安装nvidia-docker2Ubuntu18.04.1安装Docker CE 18.0
翻译
0评论
0点赞
发布博客于 2 月前

win10安装docker

1,安装:https://www.runoob.com/docker/windows-docker-install.html2,设置阿里云镜像,加快下载:https://blog.csdn.net/qq_37475168/article/details/1047117383,镜像导出:https://blog.csdn.net/qxqxqzzz/article/details/109723502
翻译
0评论
0点赞
发布博客于 2 月前

docker镜像打包、离线加载

https://blog.csdn.net/topswim/article/details/86613507
翻译
0评论
0点赞
发布博客于 2 月前

docker联网、拉取镜像慢、报错:Error response from daemon Get xxx request canceled while waiting for connection (

症状:1,拉取镜像慢,只有关闭docker service,打开dockerd --debug之后才能拉取2,不关闭docker service拉取不了,报错:Error response from daemon: Get nvcr.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)说明联网有问题。3,也可以通过sudo d
原创
0评论
0点赞
发布博客于 2 月前

docker Job for docker.service failed because the control process exited with error code.

docker无法重启$ sudo service docker restartJob for docker.service failed because the control process exited with error code.See "systemctl status docker.service" and "journalctl -xe" for details.无法查看容器$ sudo docker container lsCannot connect to the Doc
原创
1评论
1点赞
发布博客于 2 月前

pip apt proxy _vendor.requests.exceptions.SSLError: HTTPSConnectionPool(host=‘pypi.org‘, port=443

1,pip死活连不上,提示没有SSL模块$ pip3 search mxnetRetrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /pypiRetrying (Retry(tot
原创
0评论
0点赞
发布博客于 2 月前

ubuntu系统硬件状态监控:内存使用量、温度

$ free -hlhttps://blog.csdn.net/we_shell/article/details/36887629
翻译
0评论
0点赞
发布博客于 2 月前

shell脚本使用scp命令远程拷贝文件

缺点:不安全,明文账号密码优点:简单好用用途:从本地/data/xxx/src_folder文件夹下拷贝多个文件(model-*.params, model-symbol.json)到远程服务器(10.xxx.xxx.xxx)的/data5/dst_folder目录下$ sudo apt install sshpass下面脚本存为 xxx.sh#!/usr/bin/bash# usage: sudo sh xxx.shtime=$(date "+%Y%m%d%H%M%S")mpath="
翻译
0评论
0点赞
发布博客于 2 月前

停止dockerd进程

sudo systemctl stop dockerhttps://stackoverflow.com/questions/40192415/how-permanently-kill-dockerd
翻译
0评论
0点赞
发布博客于 2 月前

mxnet softmaxOutput softmaxActivation softmax_cross_entropy

真是晕,搞一堆名字相近的API。真不知道咋想的,你搞出来了新的,麻烦就把旧的废弃掉好不好。。。。mx.symbol.SoftmaxOutput计算交叉熵损失相对于softmax输出的梯度。1). 根据网络输出计算softmax输出 (网络输出通过指数计算为核心的softmax函数转成0~1之间的概率分布)2). 根据softmax输出和label计算交叉熵损失 (基于两种概率分布计算交叉熵损失)3). 根据交叉熵损失和labelmx.symbol.SoftmaxActivation将s
原创
6评论
1点赞
发布博客于 2 月前

MXNetError: Check failed: assign(&dattr, vec.at(i)): Incompatible attr in node at 0-th output: expe

报错:MXNetError: Check failed: assign(&dattr, vec.at(i)): Incompatible attr in node at 0-th output: expected [51249,512], got [59643,512]这种奇奇怪怪的报错其实很头疼,mxnet给出的提示根本很难定位到具体代码,详细:Traceback (most recent call last): File "train_0723.py", line 494, in
原创
0评论
1点赞
发布博客于 2 月前

mxnet 1.7.0 ubuntu 18.04训练报错:AttributeError: ‘FaceImageIter‘ object has no attribute ‘provide_data‘

Description: Ubuntu 18.04.5 LTSCodename: bionicpython: 3.7.7出错部分的简略代码:from image_iter import FaceImageItertrain_dataiter = FaceImageIter(...)train_dataiter = mx.io.PrefetchingIter(train_dataiter)报错有两条:AttributeError: ‘FaceImageIter’ obj
原创
0评论
0点赞
发布博客于 2 月前

BN层

原理batch的训练方法:按照batch来更新梯度,减少了梯度下降时的随机性;与遍历整个数据集相比,减少计算量。步骤:求batch均值、batch方差对每个元素进行归一化尺度缩放和偏移 (变换回数据原始分布,减少)思想参数用法BN层放在卷积层后,用于重新调整数据分布...
翻译
0评论
0点赞
发布博客于 2 月前

VGG16结构

主要思想改进点缺点:
翻译
0评论
0点赞
发布博客于 2 月前

EfficientNet,ShuffleNet,XceptionNet,SENet

EfficientNet年份:2019。来源:google主要思想:ShuffleNetXceptionNet
翻译
0评论
0点赞
发布博客于 2 月前

ubuntu apt update 报错: Certificate verification failed: The certificate is NOT trusted handshake

1,系统时间不对。改系统时间和时区2,把/etc/apt/source.list中出错的URL中的https换成http
翻译
0评论
0点赞
发布博客于 2 月前

mxnet simple_bind error inconsistent shape

构建模型后bind出错,提示shape不对。Error in operator fullyconnected0: Shape inconsistent, Provided=[1024,xxx], inferred shape=(1024,xxx)Provided: 模型中定义的inferred: 实际运行时产生的(可能infer的时候你才知道是多少)可能你给网络层定义了权重,是权重的shape不对导致的。那就调整网络层权重的shape,保证provide和infer的shape中第二位的xxx保持
原创
0评论
0点赞
发布博客于 2 月前

mxnet InferShape pass cannot decide shapes for the following arguments (xxx means unknown dimensions

mxnet构建模型时报错:InferShape pass cannot decide shapes for the following arguments (xxx means unknown dimensions). Please consider providing them as inputs:xxx引起报错的代码:sym_input = mx.symbol.Variable('sym_input',)原因:你定义的占位符mx.symbol.Variable没有指定一个空的shape解决
原创
0评论
0点赞
发布博客于 2 月前

mxnet recordio读取rec文件pos = ctypes.c_size_t(self.idx[idx])报错 KeyError: 0

Traceback (most recent call last): File "image_iter.py", line 42, in <module> C = FaceImageIter(20, (3,112,112), path_imgrec='/home/user1/data/deepglint/train.rec') File "image_iter.py", line 39, in __init__ s = self.imgrec.read_idx(0)
原创
0评论
0点赞
发布博客于 2 月前

TypeError: can‘t concat str to bytes

这是python2和python3的一个差别,python2可以直接将字节和字符串拼接,python3不可以:$ python2Python 2.7.18 (default, Aug 4 2020, 11:16:42)[GCC 9.3.0] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> b'\x00\x00\x80@\x00\x00\xa0@'+'''\x0
原创
0评论
0点赞
发布博客于 2 月前

python字符串截取的坑:strip, lstrip, rstrip

截掉 string 左边的空格(默认),可以指定需要截掉的字符串,字符串可以是一个字符,或者多个字符,但是注意:匹配时不是按照整个字符串匹配的,而是一个个匹配的!!!!>>> a = '/abc/10000127/1567547479,2287369560_align.jpg'>>> a.lstrip('/abc/')# 你以为截取的结果是 10000127/1567547479,2287369560_align.jpg ?# naive!!# 结果变成了
原创
0评论
0点赞
发布博客于 2 月前

denseNet思想

和ResNet的区别:ResNet是求和,而DenseNet是做一个拼接。**每一层网络的输入为:当前输入+前面所有层网络的输出。**第L层的输入等于K x (L-1) + k0,其中k是生长率,表示每一层的通道数。提升信息和梯度在网络中的传输效率:每层都能直接从损失函数拿到梯度,并且直接得到输入信号。目的:训练更深的网络,有正则化的效果。其他网络致力于从深度和宽度来提升网络性能,而DenseNet从特征重用的角度来提升网络性能细节:一个完整的dense net,包括3个dense block.
翻译
0评论
0点赞
发布博客于 2 月前

inception v1 v1加强版 v2 v3 v4区别

inception v1把googleNet的某一些大的卷积层换成11, 33, 5*5的小卷积,减少权重参数量以上三种卷积并列,3x3池化并列为什么不直接使用11的,而还需要33和5*5?是为了适应更多的尺度,不受输入图像被缩放的影响(相当于金字塔)inception v1加强版网络结构没有太大变化。输入增加BN (训练收敛更快,学习更高效,可以减少dropout的使用)。具体步骤:求batch均值,求batch方差,对输入进行归一化,归一化之后再进行缩放和平移(输入x乘以伽马、加上贝塔
翻译
0评论
0点赞
发布博客于 2 月前

mobilenet v1 v2 v3区别

mobilenet v1将标准卷积改为3x3的深度分离卷积(depthwise) 和 1x1点卷积(pointwise)mobilenet v2根据流形学习得出结论:ReLU导致的较多的信息损耗。但是不能直接用线性激活代替RELU,所以:在输出通道较少的时候用线性激活函数,其他时候ReLU6relu6: y= min(max(0,x), 6), 通过实验发现用6最好。图像:根据流形学习得出结论:如果增加通道数量能够减少信息损失就使用更多通道。所以:使用ReLU6的时候,增加通道数为输
翻译
0评论
0点赞
发布博客于 2 月前

YOLO V1 V2 V3 9000的区别

网络结构不同LOSS不同实现细节不同YOLO V1网络结构(卷积层、池化层、全连接层):24卷积层+2FC(全连接层)。实现细节:最后两个FC参数冗余、只支持固定分辨率将输入的图片分割成SxS的网格,每个单元格负责去检测那些中心点落在该格子内的目标 (训练时这么去计算loss)每个单元格会预测B个边界框以及边界框的置信度:p*IOU每个边界框表示为(x, y, w, h),即中心点和宽高YOLO V2网络结构(在v1基础上去掉了全连接层,在每一个卷积层后边.
翻译
1评论
0点赞
发布博客于 2 月前

YOLO与SSD的区别

YOLO将物体检测这个问题定义为bounding box和分类置信度的回归问题。将整张图像作为输入,划分成SxS grid,每个cell预测B个bounding box(x, y, w, h)及对应的分类置信度(class-specific confidence score)。分类置信度是bounding box是物体的概率及其与真实值IOU相乘的结果。SSD将物体检测这个问题的解空间,抽象为一组预先设定好(尺度,长宽比)的bounding box。在每个bounding bo
翻译
0评论
0点赞
发布博客于 2 月前

visual studio community 2019 c++解决方案生成失败,每次运行都是之前代码产生的相同结果!

代码没问题的话,关闭然后重新打开vs软件,再点击 本地windows 调试器 重新运行就好了SB的MS!!
原创
0评论
0点赞
发布博客于 2 月前

C++追加写入结果到txt

采用追加写入std::string fout = "C:\\Users\\usr1\\tmp\\images//images.txt";std::ofstream out1(fout, std::ofstream::app);//指定追加末尾的方式写入// 代码折行使用 \// 输出tab 间隔采用 "\t", '\t'// attr_list 是一个指向结果存储位置的的指针for (int i = 0; i < attr_list->num; ++i) { out1 <&l
翻译
0评论
0点赞
发布博客于 3 月前

c++循环读取图片/文件路径

如果要显示图片的话,需要装opencv#include <opencv2\opencv.hpp>#include <string>std::string folder_path = "C:\\Users\\usr1\\Desktop\\tmp\\tmp\\images\\*.*"; //path of folder, you can replace "*.*" by "*.jpg" or "*.png"std::vector<cv::String> file_n
翻译
0评论
0点赞
发布博客于 3 月前

tensorflow keras模型Exception: URL fetch failure on https://storage.googleapis.com/keras-applications

linux ubuntu tensorflow.keras加载模型报错:Traceback (most recent call last): File "demo.py", line 137, in <module> main() File "demo.py", line 93, in main model = get_model(cfg) File "/home/user1/pjs/frvt/deb-age/open_models/age-gender-estim
原创
0评论
0点赞
发布博客于 3 月前

win10 windows文件查找通配符

比如查找所有 名字为 xxx__x4x.jpg 的图片*_?4?.jpg还可以根据多个条件查找,使用OR等,没用过。。https://zhidao.baidu.com/question/936592004977120012.html
翻译
0评论
0点赞
发布博客于 3 月前

mxnet ubuntu18.04 python3.7.7 cuda10.1 AttributeError: module ‘mxnet‘ has no attribute xxx

报错:$ pythonPython 3.7.7 (default, Mar 26 2020, 15:48:22)[GCC 7.3.0] :: Anaconda, Inc. on linuxType "help", "copyright", "credits" or "license" for more information.>>> import mxnet as mx>>> mx.cpuAttributeError: module 'mxnet' has
原创
0评论
0点赞
发布博客于 3 月前

ngrok ERR_NGROK_302

重新生成一下配置文件yml就好了$ cd path_to_ngrok$ ./ngrok authtoken 5SxxxxxxxxHB参考:https://dashboard.ngrok.com/get-started/setup
翻译
0评论
0点赞
发布博客于 3 月前

c++ caffe 相关编译问题及解决

1,报错:caffe.pb.h:17:2: error: #error This file was generated by an older version of protoc which is解决:重新编译生成caffe.pb.h参考:2,报错error: \u2018AnnotatedDatum\u2019 in namespace \u2018caffe\u2019 does not name a type
原创
0评论
0点赞
发布博客于 3 月前

linux ubuntu 各种依赖不满足,修复不了:E: Release file for xxx InRelease is not valid yet (invalid for xxx

sudo apt update不行:Reading package lists... DoneE: Release file for https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/focal-updates/InRelease is not valid yet (invalid for another 9d 23h 6min 27s). Updates for this repository will not be applied.E: Rele
翻译
0评论
1点赞
发布博客于 3 月前

ubuntu 18.04安装caffe

先安装conda然后$ conda install caffe-gpu
原创
0评论
0点赞
发布博客于 3 月前