个人代码问题记录
内容全部来自网上搜集防止再次遇到同样问题找不到地方参考了遇到问题解决了就更新MATLAB1求逆问题奇异使用函数xlsqminnorm(A,b)或伪逆xpinv(A)*b矩阵求逆若出现“矩阵接近奇异值或者缩放错误“怎么办2graphshortestpath新版本删除了这个函数改为shortestpath[ dist,path{1} ] graphshortestpath( adjMatrix, 1, numel(newImg(:)));with[ path{1}, dist ] shortestpath( digraph(adjMatrix), 1, numel(newImg(:)));Replacing old version graphshortestpath with new shortestpath functionPYTHON1模型放置位置原始位置C:\Users\xxx\.cache\torch\hub\checkpoints\路径修改2cannot import name packaging from pkg_resources参考ImportError: cannot import name ‘packaging‘ from ‘pkgfrom pkg_resources import packaging ImportError: cannot import name packaging from pkg_resources pip uninstall setuptools Found existing installation: setuptools 70.3.0 Uninstalling setuptools-70.3.0: Would remove: \_distutils_hack \pkg_resources \setuptools \setuptools-70.3.0-py3.12.egg-info Proceed (Y/n)? y Successfully uninstalled setuptools-70.3.0 pip install setuptools69.5.13python -m visdom.serverChecking for scripts.Downloading scripts, this may take a little while这个一直加载卡着不动。visdom服务启动时提示Downloading scripts, this may take a little while解决办法/visdom/server/run_server.py文件里面改函数download_scripts_and_run将download_scripts()注释掉然后使用github替换文件github替换4xformers安装问题要找对应torch版本的xformers安装指令是conda create -n pytorch28 python3.10conda activate pytorch28pip install torch2.8.0 --index-url https://download.pytorch.org/whl/cu128pip install xformers0.0.32.post2 --index-url https://download.pytorch.org/whl/cu128torch安装去官网找历史版本该指令只做说明2.8对应xformers版本cuda版本对应5ModuleNotFoundError: No module named pkghttps://blog.51cto.com/u_16099193/14588431降级setuptools版本pip install setuptools82其他1Latex的figure-fig只需要载入宏包 \usepackage{caption}并且在begin {document} 下面输入\captionsetup[figure]{labelfont{bf},labelformat{default},labelsepperiod,name{Fig.}}用LATEX插入图片时要将figure 1改为fig.1.同理可以有table加粗\captionsetup[table]{labelfont{bf},labelformat{default},labelsepperiod}2解决Edge的copilot消失问题解决新版Edge浏览器右上角不显示Copilot图标的问题直接使用这个python程序就行使用的话需要开全局的代理但是貌似每次用都要运行一次3nvidia-smi Failed to initialize NVML: Unknown Error需要卸载驱动重装先去Nvidia官网下载对应驱动下载DDU断网进入安全模式选择N卡卸载后重启。重新安装驱动默认设置即可ps安装新版的驱动能一定程度提升CUDA版本42.4g能连5g断网问题设备管理器wifi属性高级的里面改成n。https://zhuanlan.zhihu.com/p/7163842665,kaggle配置代码文件要传文件格式的数据集传压缩包然后代码文件命名同路径下的可以再次上传进行替换而不用整体重新上传。6kaggle删除文件指令避免有些模型保存一下比较大的文件难以下载https://blog.csdn.net/kekekac/article/details/137027949