小bugs搜集和解决方法,亲测有效(2022-2023)
有些小bugs几行指令就能解决,写太多不好,这里就进行一个2022-2023这段时间的bugs collection和solution。
Deep Learning
How to make really empty tensor?
a = nn.Torch([])
b = torch.empty(2,3)
for i in rang(3):a = torch.cat(a, b, dim=0)
Mismatched attribute type in ’ : value’ ==> Context: Bad node spec for node. Name: OpType: Constant
pip uninstall onnx; pip install onnx==1.11
参考:
onnx
Try running yolov3_onnx sample
Can’t pickle local object 'MiniImagenet.init..
windows不支持:
No, it is not supported on Windows. The reason is that multiprocessing lib doesn’t have it implemented on Windows. There are some alternatives like dill that can pickle more objects.
类似问题:
Can’t pickle local object ‘DataLoader.__init__.<locals>.<lambda>'
参考资料:
Can’t pickle local object ‘DataLoader.init..’
Python 3.11 + pytorch in win11 has error
Use python 3.10.
Freeze layer bugs
Model.named_parameters()会忽略掉一些参数,比如:
Conv1.Bn.running_mean
Conv1.Bn.running_var
Conv1.Bn.num_batches_tracked
解决方法,用model.state_dict():
for k, v in model.state_dict().items():print kprint type(v)
参考资料:
Model.named_parameters() will lose some layer modules
Python
Import “imgaug.augmenters” could not be resolved PylancereportMissingImports
解决方法:
conda install imgaug
Cannot import name ‘_registerMatType’ from ‘cv2.cv2’ #1494
在cmd等命令窗口卸载imagua。Uninstall imagua in user folder by cmd.
pip uninstall imagua
The frame append method is deprecated use pandas.concat instead
从
self.F1ScoreDF = self.F1ScoreDF.append(pd.DataFrame(TCnn.F1Score).T)
改成
self.F1ScoreDF = pd.concat([self.F1ScoreDF, pd.DataFrame(TCnn.F1Score).T])
set_yticks does not show up
Map类型的数据不要用来做label。It is nothing about figure size, but just the label names are stored by map object, which is illegal.
ax.set_yticks(np.arange(data.shape[0]), labels=ClassNames)ClassNames = map(str.upper, opt.class_names)
to
ClassNames = list(map(str.upper, opt.class_names))
Anaconda
OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause
incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program
to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://www.intel.com/software/products/support/.
解决方法:
将mkl在anaconda得navigator删除。
remove mkl in anaconda navigator。
Anaconda libstdc++.so.6: version `GLIBCXX_3.4.20’ not found
conda update libstdcxx-ng
参考资料:
Anaconda libstdc++.so.6: version `GLIBCXX_3.4.20’ not found
sklearn for conda
conda install -c conda-forge scikit-learn
GitHub
fatal: unable to access Connection was reset in connection to github.com:443
git config --global --get http.proxy
参考:
Getting Git to work with a proxy server - fails with “Request timed out”
! [remote rejected] main -> main (Internal Server Error)
! [remote rejected] main -> main (Internal Server Error)
error: failed to push some refs to 'https://github.com/anthonyweidai/Advanced_SPL_Classification.git'
解决方法:
git config --bool core.bare true
参考:
Git push error ‘[remote rejected] master -> master (branch is currently checked out)’
fatal: this operation must be run in a work tree
git config --unsetcore.bare
参考:
[FIXED] fatal: this operation must be run in a work tree
The term ‘conda’ is not recognized as the name of a cmdlet
The term 'conda' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again
解决方法:
Add
S:\ProgramData\Anaconda3
S:\ProgramData\Anaconda3\Scripts
S:\ProgramData\Anaconda3\Library\bin
to environment.
Or install anaconda with adding path environment option.
Reboot computer.
conda init powershell
conda init cmd.exe
Git upper case lower case
git config --global core.ignorecase false
参考资料:
How do you change the capitalization of filenames in Git?
Others
the system cannot find the path specified
Click the file inside the zip, and then unzip inside files directly.
‘npm’ is not recognized as an internal or external command
下载Nodejs,download Nodejs.
相关文章:
小bugs搜集和解决方法,亲测有效(2022-2023)
有些小bugs几行指令就能解决,写太多不好,这里就进行一个2022-2023这段时间的bugs collection和solution。 Deep Learning How to make really empty tensor? a nn.Torch([]) b torch.empty(2,3) for i in rang(3):a torch.cat(a, b, dim0)Mismatc…...
归并排序和快速排序的两种实现
在此之前我们已经介绍过归并排序和快速排序:浅谈归并排序与快速排序,但其中的实现都是基于递归的。本文将重新温故这两种算法并给出基于迭代的实现。 目录 1. 归并排序1.1 基于递归1.2 基于迭代 2. 快速排序2.1 基于递归2.2 基于迭代 1. 归并排序 1.1 基…...
C#,《小白学程序》第十四课:随机数(Random)第一,几种随机数的计算方法与代码
1 文本格式 /// <summary> /// 《小白学程序》第十四课:随机数(Random)第一,几种随机数的计算方法与代码 /// 本课初步接触一下随机数。 /// </summary> /// <param name"sender"></param> ///…...
[杂谈]-快速了解Modbus协议
快速了解Modbus协议 文章目录 快速了解Modbus协议1、为何 Modbus 如此受欢迎2、范围和数据速率3、逻辑电平4、层数5、网络与通讯6、数据帧格式7、数据类型8、服务器如何存储数据9、总结 Modbus 是一种流行的低速串行通信协议,广泛应用于自动化行业。 该协议由 Mo…...
WhatsApp的两个商业模式该如何选择
WhatsApp Business 是什么 目前 WhatsApp 提供两种商业模式,企业应根据自身需求选择相应版本。 第一个版本是 WhatsApp Business:初创企业只需一个手机应用程序,便可以个体单位与客户轻松互动; 另一个版本是 WhatsApp Business APIÿ…...
动态表单设计
动态表单设计 背景方案讨论基于上面分析,对比调研,自定义动态表单数据模型表单详解(一) 表单模板:jim_dynamic_form(二)表单数据类型:jim_form_data_type(三)…...
JAR will be empty - no content was marked for inclusion!
现象 在对自建pom依赖组件打包时,出现JAR will be empty - no content was marked for inclusion!错误。 方案 在pom中怎么加packaging标签内容为pom,标识只打包pom文件 <?xml version"1.0" encoding"UTF-8"?> ...<grou…...
软件生命周期及流程【软件测试】
软件的生命周期 软件生命周期是软件开始研制到最终被废弃不用所经历的各个阶段。 瀑布型生命周期模型 规定了它们自上而下、相互衔接的固定次序,如同瀑布流水,逐级下落,具有顺序性和依赖性。每个阶段规定文档并需进行评审。 特点ÿ…...
2023高教社杯数学建模E题思路代码 - 黄河水沙监测数据分析
# 1 赛题 E 题 黄河水沙监测数据分析 黄河是中华民族的母亲河。研究黄河水沙通量的变化规律对沿黄流域的环境治理、气候变 化和人民生活的影响, 以及对优化黄河流域水资源分配、协调人地关系、调水调沙、防洪减灾 等方面都具有重要的理论指导意义。 附件 1 给出了位…...
双翌保养码使用指南方法(一)
保养码使用指南一 为了确保软件的正常运行和有效使用,正确地使用保养码是至关重要的。以下是保养码使用的简单指南,以帮助您进行正确的操作。 1. 打开软件入口:首先,在您的电脑上打开文件夹,并找到s-y softactive tool…...
hive指定字段插入数据,包含了分区表和非分区表
1、建表 语句如下: CREATE EXTERNAL TABLE ods_lineitem_full (l_shipdate date,l_orderkey bigint,l_linenumber int,l_partkey int,l_suppkey int,l_quantity decimal(15, 2),l_extendedprice decimal(15, 2),l_discount de…...
浏览器端vscode docker搭建(附带python环境)
dockerfile from centos:7 #安装python环境 run yum -y install wget openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel zlib-devel libffi-devel gcc make run wget https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tgz run tar -xvf Python-3.9.…...
Echarts图表跟随父容器的变化自适应
如果页面中有多个图表 隐藏/展开左边侧边栏echarts图表自适应 <div class"line"><div class"title">制冷站关键参数</div><div id"chartLine1" style"width: 100%;height:85%;"></div></div><…...
【多线程】ThreadLocal是什么?有哪些使用场景?使用ThreadLocal需要注意些什么?
文章目录 前言一、ThreadLocal 是什么?二、有哪些使用场景?三、实现原理四、在线程池中使用 ThreadLocal 为什么可能导致内存泄露呢?五、线程池中,如何正确使用 ThreadLocal?六、ThreadLocal 核心方法 前言 一、Threa…...
一种基于动态代理的通用研发提效解决方案
作为一名研发人员,除了业务开发之外,研发提效是一个永恒的话题,而女娲正是这一话题下进行的一次全面的剖析和实践。 作者:张全洪(钝悟) 一、女娲是什么 女娲是业务研发同学(开发、测试、运维)在软件迭代的…...
【vue3】一些关于hooks的使用经验
前言 最近接到了一个需求,隔壁嵌入式部门希望我们用前端解析渲染Kconfig表单。这篇文章用来记录一下本次使用hook pinia vue3的经验 hooks hooks的概念最早是在 React 中听到的,虽然早些时间也写过一点react,但也只是照葫芦画瓢…...
面试系列 - Java 并发容器详解
Java 并发容器是一组用于在多线程环境下安全访问和操作数据的数据结构。它们提供了线程安全的集合和映射,使开发者能够更轻松地处理并发编程问题。 一、Java并发容器 ConcurrentHashMap: 它是一个高效的并发哈希表,支持多线程并发操作而不需…...
使用动态住宅代理还能带来哪些好处?
一、什么是动态住宅代理ip 动态住宅代理是一种代理技术,它利用代理服务器中转用户和目标服务器之间的网络流量,实现用户真实位置的屏蔽。代理提供商会有自己的ip大池子,当你通过代理服务器向网站发送请求时,服务器会从池子中选中…...
笙默考试管理系统-MyExamTest----codemirror(18)
笙默考试管理系统-MyExamTest----codemirror(18) 目录 一、 笙默考试管理系统-MyExamTest----codemirror 二、 笙默考试管理系统-MyExamTest----codemirror 三、 笙默考试管理系统-MyExamTest----codemirror 四、 笙默考试管理系统-MyExamTest---…...
TGA格式文件转材质
今天淘宝上买了一个美女的模型,是blender的源文件,上面说有fbx格式的。我用unity,所以觉得应该可以用。文件内容如下图: FBX文件夹打开后,内容如下图所示,当时就预感到可能没有色彩。 unity打开后果然发现只…...
基于算法竞赛的c++编程(28)结构体的进阶应用
结构体的嵌套与复杂数据组织 在C中,结构体可以嵌套使用,形成更复杂的数据结构。例如,可以通过嵌套结构体描述多层级数据关系: struct Address {string city;string street;int zipCode; };struct Employee {string name;int id;…...
练习(含atoi的模拟实现,自定义类型等练习)
一、结构体大小的计算及位段 (结构体大小计算及位段 详解请看:自定义类型:结构体进阶-CSDN博客) 1.在32位系统环境,编译选项为4字节对齐,那么sizeof(A)和sizeof(B)是多少? #pragma pack(4)st…...
可靠性+灵活性:电力载波技术在楼宇自控中的核心价值
可靠性灵活性:电力载波技术在楼宇自控中的核心价值 在智能楼宇的自动化控制中,电力载波技术(PLC)凭借其独特的优势,正成为构建高效、稳定、灵活系统的核心解决方案。它利用现有电力线路传输数据,无需额外布…...
376. Wiggle Subsequence
376. Wiggle Subsequence 代码 class Solution { public:int wiggleMaxLength(vector<int>& nums) {int n nums.size();int res 1;int prediff 0;int curdiff 0;for(int i 0;i < n-1;i){curdiff nums[i1] - nums[i];if( (prediff > 0 && curdif…...
DIY|Mac 搭建 ESP-IDF 开发环境及编译小智 AI
前一阵子在百度 AI 开发者大会上,看到基于小智 AI DIY 玩具的演示,感觉有点意思,想着自己也来试试。 如果只是想烧录现成的固件,乐鑫官方除了提供了 Windows 版本的 Flash 下载工具 之外,还提供了基于网页版的 ESP LA…...
【android bluetooth 框架分析 04】【bt-framework 层详解 1】【BluetoothProperties介绍】
1. BluetoothProperties介绍 libsysprop/srcs/android/sysprop/BluetoothProperties.sysprop BluetoothProperties.sysprop 是 Android AOSP 中的一种 系统属性定义文件(System Property Definition File),用于声明和管理 Bluetooth 模块相…...
相机从app启动流程
一、流程框架图 二、具体流程分析 1、得到cameralist和对应的静态信息 目录如下: 重点代码分析: 启动相机前,先要通过getCameraIdList获取camera的个数以及id,然后可以通过getCameraCharacteristics获取对应id camera的capabilities(静态信息)进行一些openCamera前的…...
什么是EULA和DPA
文章目录 EULA(End User License Agreement)DPA(Data Protection Agreement)一、定义与背景二、核心内容三、法律效力与责任四、实际应用与意义 EULA(End User License Agreement) 定义: EULA即…...
CMake 从 GitHub 下载第三方库并使用
有时我们希望直接使用 GitHub 上的开源库,而不想手动下载、编译和安装。 可以利用 CMake 提供的 FetchContent 模块来实现自动下载、构建和链接第三方库。 FetchContent 命令官方文档✅ 示例代码 我们将以 fmt 这个流行的格式化库为例,演示如何: 使用 FetchContent 从 GitH…...
汇编常见指令
汇编常见指令 一、数据传送指令 指令功能示例说明MOV数据传送MOV EAX, 10将立即数 10 送入 EAXMOV [EBX], EAX将 EAX 值存入 EBX 指向的内存LEA加载有效地址LEA EAX, [EBX4]将 EBX4 的地址存入 EAX(不访问内存)XCHG交换数据XCHG EAX, EBX交换 EAX 和 EB…...
