<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[qq_28935065的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/qq_28935065</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; qq_28935065]]></copyright><item><title><![CDATA[c++ 加载yaml文件]]></title><link>https://blog.csdn.net/qq_28935065/article/details/125639379</link><guid>https://blog.csdn.net/qq_28935065/article/details/125639379</guid><author>qq_28935065</author><pubDate>Wed, 06 Jul 2022 14:52:13 +0800</pubDate><description><![CDATA[1.安装yaml-cpp从git 上下载yaml-cpp，并进行编译 git clone https://github.com/jbeder/yaml-cpp.gitcd yaml-cppmkdir -p buildcmake -DYAML_BUILD_SHARED_LIBS=ON ..makemake install注意，如果没有-DYAML_BUILD_SHARED_LIBS=ON，则默认生成静态库在执行make install可能会有一些错误，适当加入sudo 权限2. 编写加载yaml 文件的c++]]></description><category></category></item><item><title><![CDATA[pytorch 模型训练的多GPU训练]]></title><link>https://blog.csdn.net/qq_28935065/article/details/125483086</link><guid>https://blog.csdn.net/qq_28935065/article/details/125483086</guid><author>qq_28935065</author><pubDate>Mon, 27 Jun 2022 14:29:44 +0800</pubDate><description><![CDATA[pytorch针对多GPU训练提供了两个类来实现多GPU训练，分别是torch.nn.DataParallel和torch.nn.DataParallel相对比较简单，因此先介绍torch.nn.DataParallel。当使用torch.nn.DataParallel的时候，数据会分配到各个GPU中，完成前向计算，然后再汇总到主卡计算loss，进行反向传播。显然，这种方式会使得多个GPU之间负载不均衡。torch.nn.DataParallel具体的使用方法


注意device_ids 为指定需要训练的]]></description><category></category></item><item><title><![CDATA[BERT继续预训练任务之loss为nan]]></title><link>https://blog.csdn.net/qq_28935065/article/details/125424522</link><guid>https://blog.csdn.net/qq_28935065/article/details/125424522</guid><author>qq_28935065</author><pubDate>Thu, 23 Jun 2022 12:12:27 +0800</pubDate><description><![CDATA[BERT继续预训练任务之loss为nan]]></description><category></category></item><item><title><![CDATA[使用pke模块抽取中文关键短语所踩的坑]]></title><link>https://blog.csdn.net/qq_28935065/article/details/124011619</link><guid>https://blog.csdn.net/qq_28935065/article/details/124011619</guid><author>qq_28935065</author><pubDate>Thu, 07 Apr 2022 12:11:23 +0800</pubDate><description><![CDATA[pke模块抽取中文关键短语注意事项]]></description><category></category></item><item><title><![CDATA[语法纠错数据生成方法]]></title><link>https://blog.csdn.net/qq_28935065/article/details/123477040</link><guid>https://blog.csdn.net/qq_28935065/article/details/123477040</guid><author>qq_28935065</author><pubDate>Mon, 14 Mar 2022 18:15:23 +0800</pubDate><description><![CDATA[语法纠错属于句子级的校对，需要检测并纠正句子中的错误，其中语法纠错目前已经公开的数据量不多，而现在解决语法纠错的问题主要是采用深度学习的模型，这些深度学习的模型需要大量的训练数据，因此本文总结了几种语法纠错数据生成的方法]]></description><category></category></item><item><title><![CDATA[Language Model Pretrain 方法]]></title><link>https://blog.csdn.net/qq_28935065/article/details/123467182</link><guid>https://blog.csdn.net/qq_28935065/article/details/123467182</guid><author>qq_28935065</author><pubDate>Mon, 14 Mar 2022 11:35:48 +0800</pubDate><description><![CDATA[现在pretrain- fine-tune模式已经成为了去解决NLP任务的常用方法，下面总结了一些常见的pretrain 方法]]></description><category></category></item><item><title><![CDATA[如何开始学术研究？]]></title><link>https://blog.csdn.net/qq_28935065/article/details/123008191</link><guid>https://blog.csdn.net/qq_28935065/article/details/123008191</guid><author>qq_28935065</author><pubDate>Fri, 18 Feb 2022 17:47:02 +0800</pubDate><description><![CDATA[说起来，这个问题应该是上研究生之前，或者正在上研究生的时候应该去搞明白的问题，但是一直到毕业多年了，都还没有弄清楚过这个问题。直到现在才真正知道做学术研究的方法论。

首先，成为一个研究生之后，都有一个指导老师来带研究生，每一个导师都会有具体的研究方向，或者研究的领域，如果就沿着导师所研究的领域做，那么已经有了一个大方向。如果不想沿着导师所研究的领域去做，那么就需要自己去找感兴趣的方向。

其次，有了大方向之后，就要去寻找该大方向下，学者们都在研究什么问题/解决什么问题。

确定了大家都在研究的问题之后，就]]></description><category></category></item><item><title><![CDATA[transformers加载模型报错]]></title><link>https://blog.csdn.net/qq_28935065/article/details/120761276</link><guid>https://blog.csdn.net/qq_28935065/article/details/120761276</guid><author>qq_28935065</author><pubDate>Thu, 14 Oct 2021 12:00:11 +0800</pubDate><description><![CDATA[当使用AutoModelForSeq2SeqLM加载模型时，报错RuntimeError: a view of a leaf Variable that requires grad is being used in an in-place operation.

一开始以为是transformers版本的问题，换个各种版本之后还是不行（尝试transformers 3.0，3.4，4.0），然后将torch（之前的版本是1.9）的版本换为1.7错误就没有了
...]]></description><category></category></item><item><title><![CDATA[BERT基本原理是什么？]]></title><link>https://blog.csdn.net/qq_28935065/article/details/120230384</link><guid>https://blog.csdn.net/qq_28935065/article/details/120230384</guid><author>qq_28935065</author><pubDate>Fri, 10 Sep 2021 22:18:54 +0800</pubDate><description><![CDATA[最近面试经常会被面试官问起，谈谈你对BERT的理解？你了解BERT吗？简单介绍一下BERT吧。虽然自己大概理解BERT的原理，但是表达的时候思路不够清晰 ，给面试官的感觉是似懂非懂，借此机会，想梳理一下应该怎么去表达，思路更清晰一些。大概的框架是：模型来源（提出北京）+名词解释+核心内容+模型效果+与之前模型的对比。

BERT来源于Google的一篇名叫“pre-train of deep bidirectional transformer for langgue understanding”的论文，BE]]></description><category></category></item><item><title><![CDATA[BERT 中wordPiece的原理]]></title><link>https://blog.csdn.net/qq_28935065/article/details/119356104</link><guid>https://blog.csdn.net/qq_28935065/article/details/119356104</guid><author>qq_28935065</author><pubDate>Tue, 03 Aug 2021 18:18:23 +0800</pubDate><description><![CDATA[1.为什么使用wordPiece？

在BERT中，做数据预处理的时候，使用了wordPiece，所谓的wordPiece其实是把word再进一步的拆分，拆分为piece，得到更细粒度。而为什么使用wordPiece 而不直接使用word？比如如"loved","loving","loves"这三个单词。其实本身的语义都是“爱”的意思，但是如果我们以单词为单位，那它们就算作是不一样的词，在英语中不同后缀的词非常的多，就会使得词表变的很大，训练速度变慢，训练的效果也不是太好。

2.wordPiece的实现算]]></description><category></category></item><item><title><![CDATA[如何解决RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu]]></title><link>https://blog.csdn.net/qq_28935065/article/details/119007334</link><guid>https://blog.csdn.net/qq_28935065/article/details/119007334</guid><author>qq_28935065</author><pubDate>Thu, 22 Jul 2021 19:48:46 +0800</pubDate><description><![CDATA[像这种情况，一般就是数据和模型一个在cpu，一个在GPU，或者用于计算的数据，有一些已经放到GPU里，有一些还存在CPU中，这里提供一个思路。

首先找到报错的行，看看计算时都用到哪些变量或者数据，然后使用.is_cuda这个属性去查看到底哪些是在GPU上，哪些是在CPU上，然后把它们统一都放在CPU，或者统一放在GPU上就可以。举个例子：


...]]></description><category></category></item><item><title><![CDATA[NLP领域文本增强]]></title><link>https://blog.csdn.net/qq_28935065/article/details/117818892</link><guid>https://blog.csdn.net/qq_28935065/article/details/117818892</guid><author>qq_28935065</author><pubDate>Fri, 11 Jun 2021 15:53:44 +0800</pubDate><description><![CDATA[1.何为文本增强？

  所谓的文本的增强，并不是简单的增加样本的“数量”，而是针对当前模型出现的问题，去产生有针对性的样本，
]]></description><category></category></item><item><title><![CDATA[1614. 括号的最大嵌套深度]]></title><link>https://blog.csdn.net/qq_28935065/article/details/113810907</link><guid>https://blog.csdn.net/qq_28935065/article/details/113810907</guid><author>qq_28935065</author><pubDate>Sun, 14 Feb 2021 21:03:31 +0800</pubDate><description><![CDATA[1614. 括号的最大嵌套深度（2021.02.14 leetCode刷题记）

难度系数：简单

1.题目描述





2.解题思路

思路: 用栈去实现，时间复杂度为O(N),空间复杂度O(N)

申请一个栈，然后依次遍历字符串，如果遇到左括号，那么将其压入到栈中，如果遇到右括号，那么将左括号从栈中弹出。如果遇到非括号的字符，那么继续。按照这样的思路去便利，那么在每次的弹栈之前，栈中所存的左括号最多的个数，即是最大的括号嵌入的深度。

具体代码如下：


class Solution:
    de.]]></description><category></category></item><item><title><![CDATA[2020-12-26]]></title><link>https://blog.csdn.net/qq_28935065/article/details/111749329</link><guid>https://blog.csdn.net/qq_28935065/article/details/111749329</guid><author>qq_28935065</author><pubDate>Sat, 26 Dec 2020 15:35:48 +0800</pubDate><description><![CDATA[给自己挖个坑，把NLP的知识扎实一下，附上TO DO LIST

NLP TO DO LIST

NLP发展历程
	常见的激活函数
	不同优化器之间的区别
	Word2vec原理、损失函数、两种模型框架区别和联系
	word2vec和fasttext的区别
	word2vec和Bert区别
	L1和L2区别（数学上和几何上）
	传统机器学习算法原理
	LR
		GBDT
		xgboost
		SVM
		CRF
	
	LSTM几个重要的公式和画图
	BiLSTM+CRF 在NER中的损失函数是什么
	At]]></description><category></category></item><item><title><![CDATA[自然语言处理领域国内外著名会议和期刊]]></title><link>https://blog.csdn.net/qq_28935065/article/details/91358456</link><guid>https://blog.csdn.net/qq_28935065/article/details/91358456</guid><author>qq_28935065</author><pubDate>Sun, 09 Jun 2019 22:33:24 +0800</pubDate><description><![CDATA[转发来源：https://blog.csdn.net/lyb3b3b/article/details/83548964

本文介绍自然语言处理(Natural Language Processing, NLP)领域的一些国内外著名会议和期刊。 自然语言处理(NLP)和计算语言学（Computational Linguistics, CL）有很多重合之处。

国际会议

ACL、EMNLP、NAAC...]]></description><category></category></item><item><title><![CDATA[在keras中使用交叉验证或者网格搜索踩的坑]]></title><link>https://blog.csdn.net/qq_28935065/article/details/90557676</link><guid>https://blog.csdn.net/qq_28935065/article/details/90557676</guid><author>qq_28935065</author><pubDate>Sun, 26 May 2019 01:53:35 +0800</pubDate><description><![CDATA[在keras中提供了sklearn的API：from keras.wrappers.scikit_learn import KerasClassifier，这个是分类的，也有回归的，具体的使用方法

1.create_model。即创建自己的模型，在keras中自己根据需要搭模型，例如

 def create_model(self):
 """

 :retur...]]></description><category></category></item><item><title><![CDATA[json.dump()或者json.dumps()无法序列化，报xxx  is not JSON serializable的解决方案]]></title><link>https://blog.csdn.net/qq_28935065/article/details/90265719</link><guid>https://blog.csdn.net/qq_28935065/article/details/90265719</guid><author>qq_28935065</author><pubDate>Thu, 16 May 2019 16:11:03 +0800</pubDate><description><![CDATA[1.创建一个类来继承json.JSONEncoder，重写json.JSONEncoder中的方法，即自定义序列化方法

class NpEncoder(json.JSONEncoder):
  def default(self, obj):
    if isinstance(obj, np.integer):
      return int(obj)
    ...]]></description><category></category></item><item><title><![CDATA[SVM与LR的异同]]></title><link>https://blog.csdn.net/qq_28935065/article/details/89061003</link><guid>https://blog.csdn.net/qq_28935065/article/details/89061003</guid><author>qq_28935065</author><pubDate>Sat, 06 Apr 2019 22:28:14 +0800</pubDate><description><![CDATA[SVM与LR相同点：

SVM与LR都是分类算法，解决分类问题
	如果不考虑使用核函数，SVM与LR都是线性分类模型，也就是说它们的分类决策面是线性
	SVM与LR都是监督学习方法
	SVM与LR都是判别模型。典型判别模型：KNN,感知机，DT,LR,SVM,最大熵，条件随机场，boosting等；典型生成模型：朴素贝叶斯，隐马尔可夫，高斯混合模型等
	SVM与LR在学术界和工业都广泛使用。
SV...]]></description><category></category></item><item><title><![CDATA[回归模型评价指标]]></title><link>https://blog.csdn.net/qq_28935065/article/details/84286559</link><guid>https://blog.csdn.net/qq_28935065/article/details/84286559</guid><author>qq_28935065</author><pubDate>Tue, 20 Nov 2018 10:37:13 +0800</pubDate><description><![CDATA[回归模型应用场景：预测，趋势分析、投资风险分析等

（1）MAE（Mean Absolute Error）平均绝对差值



（2）MSE(Mean Square Error)均方误差，是回归任务最常用的性能度量，最小二乘估计也是使用均方误差



（3）log对数损失函数（逻辑回归）：交叉熵损失，其实是由最大似然估计推导而来



（4）RMSE(Root Mean Square error)均...]]></description><category></category></item><item><title><![CDATA[睿智合创（北京）科技有限公司数据分析笔试——部分笔试题（附答案）]]></title><link>https://blog.csdn.net/qq_28935065/article/details/84259706</link><guid>https://blog.csdn.net/qq_28935065/article/details/84259706</guid><author>qq_28935065</author><pubDate>Mon, 19 Nov 2018 21:38:43 +0800</pubDate><description><![CDATA[1.删除重复数据

import pandas as pd

frame=pd.DataFrame({

&quot;C1&quot;:['one','two']*2+['two'],

&quot;C2&quot;:[1,1,2,3,3]

})

dele_dup=frame.drop_duplicates()

frame..drop_duplicates(inpalce=True)

注：主要考察DataFrame的drop_d...]]></description><category></category></item></channel></rss>