- 博客(14)
- 收藏
- 关注
原创 排序算法(ranking/learn to rank)
排序学习是一个有监督的机器学习过程,对每一个给定的查询-文档对,抽取特征,通过日志挖掘或者人工标注的方法获得真实数据标注。然后通过排序模型,使得输入能够和实际的数据相似。常用的排序学习分为三种类型:PointWise,PairWise和ListWise。https://zhuanlan.zhihu.com/p/26539920...
2022-01-12 10:01:11 466
原创 深度学习常见问题
1、神经网络类型众多,其中最为重要的是多层感知机。多层感知机由感知机推⼴⽽来,最主要的特点是有多个神经元层,因此也叫深度神经⽹络。相⽐于单 独的感知机,多层感知机的第i层的每个神经元和第i-1层的每个神经元都有连接。2、为什么使用深层表示?深度神经⽹络是⼀种特征递进式的学习算法,浅层的神经元直接从输⼊数据中学习⼀些低层次 的简单特征,例如边缘、纹理等。⽽深层的特征则基于已学习到的浅层特征继续学习更⾼级的特征,从计算机的⾓度学习深层的语义信息。深层的⽹络隐藏单元数量相对较少,隐藏层数⽬较多,如果浅
2021-12-25 16:53:20 3117
原创 RuntimeError: DataLoader worker (pid(s) 28749) exited unexpectedly
DataLoader(test_data, batch_size=args.batch_size, shuffle=False, num_workers=4)中的num_workers=4过大了
2021-10-27 21:02:23 356
原创 报错:ValueError: num_samples should be a positive integer value, but got num_samp=0
自己记录用的:shuffle=False就可以了
2021-08-21 16:20:50 666 1
原创 报错:使用BCEWithLogitsLoss()时RuntimeError: result type Float can‘t be cast to the desired output type
RuntimeError: result type Float can’t be cast to the desired output type long改为:test_loss = criterion(y_pred, y_gt.float()).item()
2021-08-19 17:51:15 2999
原创 报错:object has no attribute ‘module‘
自己记录用的:torch.save(net.module.state_dict(), os.path.join(args.save, 'model.pth'))改为torch.save(net.module.state_dict(), os.path.join(args.save, 'model.pth'))
2021-08-19 15:39:50 5879
原创 python报错记录
自己记录用的: for i in range(len(batch_data)): if batch_data[i] == [1., 0., 0.]: batch_label_ce = 1 elif batch_data[i] == [0., 1., 0.]: batch_label_ce = 2 elif batch_data[i] == [0.,...
2021-08-15 09:48:52 86
原创 CUDA error: device-side assert triggered
CUDA error: device-side assert triggered/1、可能是多标签的标签问题,从0开始2、使用的BCELoss应该改为BCELogitsLoss
2021-08-12 21:03:08 116
原创 报错:<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
在联网下载模型的时候报错了,<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed不知道什么原因在前面加入import sslssl._create_default_https_context = ssl._create_unverified_context成功解决!
2021-07-22 22:06:15 182
原创 服务器报错:Downloaded bytes did not match Content-Length
因为安装时间太久,去掉镜像源反而快一些。conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
2021-07-19 18:26:26 867
原创 pycharm plt不显示图像
1、import matplotlibmatplotlib.use(‘TkAgg’)2、不要点击下面快捷键run右击上方run就可以了
2021-07-19 15:35:35 321
原创 报错(interrupted by signal 11: SIGSEGV
(interrupted by signal 11: SIGSEGV准备做的是数据不平衡的问题,使用的是pytorch 交叉熵函数,weight参数一维tensor。未注意到test的交叉熵损失函数不需要.cuda()形式,所以之跑出一个train就报错了改为: weight_three = torch.FloatTensor([0.362, 4.752, 41.809])criterion = torch.nn.CrossEntropyLoss(weight=weight_three.cud
2021-07-12 15:25:38 3495
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人