草庐IT

【warning】UserWarning: The parameter ‘pretrained‘ is deprecated since 0.13 and may be removed

importtorchvision.modelsasmodelsself.backbone=models.resnet101(pretrained=True)#旧版本写法报错内容:C:\Users\ting\anaconda3\envs\pytorch\python.exeC:\Users\Administrator\PycharmProjects\FCN\model\fcn_res101.pyC:\Users\ting\anaconda3\envs\pytorch\lib\site-packages\torchvision\models\_utils.py:208:UserWarning:T

Can‘t update dev_zgd has no tracked branch

今天使用Pycharm时,本地在dev分支上,点击VCS更新按钮出现如下错误:怎么解决呢?输入以下命令:gitbranch--set-upstreammasterorigin/master来设置分支主机以跟踪远程分支主机试着更新一下,结果如下:Git更新,出现Can’tupdate:notrackedbranch错误

解决AttributeError: ‘builtin_function_or_method‘ has no object ‘xxx‘

问题原因出该问题一般来说需要检查方法使用是否正确,大部分情况下需要检查自己所写的方法或函数是否遗漏了括号。以'builtin_function_or_method'hasnoobject'view'为例错误代码如下:attn_out=attn_out.transpose(0,1).contiguous.view(tgt_len,bsz,embed_dim)该代码的目的是先将attn_out的0轴和1轴交换,然后把其维度转变为[tgt_len,bsz,embed_dim]此处错误的原因就是contiguous方法遗漏了括号。解决方法更改为如下代码attn_out=attn_out.transpo

解决conda激活环境 IMPORTANT: You may need to close and restart your shell after running ‘conda init‘.

conda激活环境报错解决IMPORTANT:Youmayneedtocloseandrestartyourshellafterrunning‘condainit’.激活conda环境condaactivatepy37报错信息CommandNotFoundError:Yourshellhasnotbeenproperlyconfiguredtouse'condaactivate'.Ifusing'condaactivate'fromabatchscript,changeyourinvocationto'CALLconda.batactivate'.Toinitializeyourshell,r

fatal: unable to access ‘http://xxxx‘: Empty reply from server

更多课程点击此处快速链接:.👉👉👉[专栏目录]-环境搭建安装问题笔记目录👈👈👈付费专栏-付费课程【购买须知】:👉👉👉个人博客笔记导读目录(全部)👈👈👈当你遇到“fatal:unabletoaccess‘http://xxxx’:Emptyreplyfromserver”的错误信息时,通常表示Git客户端无法连接到指定的服务器或仓库。以下是一些可能导致该错误的原因以及一些排除故障的步骤:错误的URL:确保你提供的URL正确无误。仔细检查URL是否存在拼写错误或输入错误。同时,验证该URL是否可以从你的网络访问。网络连接问题:检查你的网络连接,确保你可以访问其他网站或资源。如果你处于受限制的网络环

Application died in status LOADING_SOURCE_CODE: Cannot read properties of undefined (reading ‘meta‘)

用single-spa脚手架创建vue子应用时报的错误,vue3和vue2都会有,解决方式是:vue.config.jsconst{defineConfig}=require("@vue/cli-service");module.exports=defineConfig({transpileDependencies:true,configureWebpack:{output:{libraryTarget:"system",},},});文章参考

报错:CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘. 问题解决

今天在VS code里跑一个小网络,想先切换conda环境,发现无法切换了,并提示报错为:PSE:\XXX>condaactivateXXXXXCommandNotFoundError:Yourshellhasnotbeenproperlyconfiguredtouse'condaactivate'.Ifusing'condaactivate'fromabatchscript,changeyourinvocationto'CALLconda.batactivate'.Toinitializeyourshell,run$condainitCurrentlysupportedshellsare:-

echarts警告:Can‘t get DOM width or height. Please check dom.clientWidth and dom.clientHeight. ........

具体警告:Can'tgetDOMwidthorheight.Pleasecheckdom.clientWidthanddom.clientHeight.Theyshouldnotbe0.Forexample,youmayneedtocallthisinthecallbackofwindow.onload 出现问题:切换tabs初始化不同的echarts,显示不出来报错的大致意思就是:不能找到dom节点的宽高,宽高获取不了导致绘制不出图问题原因:在dom节点还没加载出来的时候就进行了图形的绘制问题找到就好办了,竟然是因为图形提前绘制,那让图形在dom节点加载完再绘制不就好了具体操作:切换tabs

git使用git push -u origin master提交远程仓库时报错error: failed to push some refs to ‘‘https://gitee.com/xx报错解决

    今天使用git将项目提交远程仓库时报错了,报错如下:        error:failedtopushsomerefsto'https://gitee.com/wang-junyanga/qiuy.git' 出现问题前的操作:    我再gitee中初始化了一个名字为Qiuy的仓库,里面有一个默认的分支为master,我想要将本地仓库中的名为my_git_test的一个vue项目推送到远程仓库Qiuy的默认分支master 中(其它的分支也一样)。正确的提交方式(解决方式):    先使用 gitremoteaddoriginhttps://gitee.com/wang-junyan

解决:Unresolved dependency: ‘org.springframework:spring-context:jar:6.0.0-M2‘

首先检查IDEA的Maven设置,无问题发现网上查找方法,未果。后查看pom.xml文件,发现此依赖写了两次,两次不同版本,且第二个版本的version较低(被自己蠢到),后注释掉第一个,更新第二个版本,解决。报错如下:更新:点击蓝色字体"Upgrade'org.springframework:spring-context'toversion'6.0.6'"点击左上角刷新按钮完成。