算法
踌躇不前的小象
这个作者很懒,什么都没留下…
展开
-
使用docker训练DNN 模型时共用宿主的显卡驱动
模型训练原创 2022-10-17 14:51:25 · 535 阅读 · 3 评论 -
使用docker 训练DNN模型报错share memory不足
学习原创 2022-10-17 14:49:00 · 1220 阅读 · 0 评论 -
About “relocation R_X86_64_32S against `.rodata‘ can not be used when making a PIE object; “
1. The error is :/usr/bin/ld: /home/idriver/work/automatic_calibration/Robotaxi_bus_auto_calibration/src/camera_sync/../third_party/protobuf/lib/x86/libprotobuf.a(common.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE obje原创 2022-04-25 10:47:11 · 1875 阅读 · 0 评论 -
Ubuntu18.04 cmake compile project: can not be used when making a PIE object; recompile with -fPIC
Solution:In "CMakeLists.txt", add next command line:set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O2 -fopenmp -w -no-pie")原创 2022-01-07 20:12:21 · 800 阅读 · 0 评论 -
ubuntu 18.04 sudo apt-get update GPG error
idriver@idriver:/var/lib/apt$ sudo apt-get updateHit:1 http://mirrors.aliyun.com/ubuntu bionic InReleaseGet:2 http://mirrors.ustc.edu.cn/ros/ubuntu bionic InRelease [4,680 B]Err:2 http://mirrors.ustc.edu.cn/ros/ubuntu bionic InRelease .原创 2022-01-05 20:04:11 · 1318 阅读 · 2 评论 -
ubuntu18.04 解决“软件中心”消失的问题
当找不到“Software & Updates center”时,解决方案如下:sudo apt install gnome-software如果无法定位软件,更换清华源:# 打开sources.list文件sudo gedit /etc/apt/sources.list# 清华源deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiversedeb-sr原创 2021-12-30 14:11:32 · 3209 阅读 · 0 评论 -
ubuntu18.04 Pthon module ‘math‘ has no attribute ‘remainder‘
Traceback (most recent call last): File "<stdin>", line 1, in <module>AttributeError: module 'math' has no attribute 'remainder'解决方法:升级python版本至3.7以上。升级python至3.7,安装pip3.7会很困难:sudo apt install python3-pippython3.7 -m pip install pi.原创 2021-12-29 19:43:36 · 1305 阅读 · 0 评论 -
ubuntu18.04 安装opencv-python遇到的问题
常规安装步骤 pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python 通常会报错: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-r06d1wnz/opencv-python/setup.py", line 511, in原创 2021-12-23 15:10:13 · 8215 阅读 · 0 评论 -
python中,利用字典记数时,使用get(key, 0)的原因
我们在统计一句话中每个单词出现的次数,会使用字典数据结构,并使用如下代码进行更新记数: count = {} for word in A.split(): count[word] = count.get(word, 0) + 1而不使用 count = {} for word in A.split(): count[word] = count[word] + 1原因是:当一个单原创 2021-01-11 12:28:57 · 3891 阅读 · 2 评论 -
快速排序为什么要从基准数位置的另一侧先开始查找、随机选择基准数该如何操作
1.快速排序为什么要从基准数位置的另一侧先开始查找知道看官心急如焚,迫切希望找到答案,在此,先总结答案,再举例说明。原因:从基准数位置的另一侧先开始查找,可以保证在两侧“探兵”相遇时,新基准值不会大于旧基准值(默认规则是升序排列)。举例:假设对如下进行排序:如上图,6在左,9在右 我们将6作为基数。假设从左边开始(与正确程序正好相反)while (nums[i] <= index && i < j) { i++; }wh...原创 2020-11-04 15:29:04 · 933 阅读 · 0 评论