TianHongZXY

那时我们一无所有,也没有什么能妨碍我们享受静夜


  • Home

  • About

  • Categories

  • Archives

Sarcasm Detection

Posted on 2019-12-05 | Edited on 2020-02-02 | In NLP | Comments:

最近在看反讽检测的文章,才读了几篇,写一下小结,因为是没接触过的领域,看得还是挺费劲,也挺懵的,写个阅读笔记,再琢磨琢磨,让自己好好重新理解一下。

Read more »

循环神经网络

Posted on 2019-11-30 | Edited on 2020-02-02 | In NLP | Comments:

RNN

简单循环神经网络是一个很简单,只有一个隐藏层的神经网络。

假设在时刻t,输入为$x_{t}$,隐藏层状态(又称隐层神经元激活值)为$h_{t}$,$h_{t}$不仅和当前输入相关,还和上一个时刻的隐藏层状态$h_{t-1}$相关。

Read more »

Attention

Posted on 2019-11-19 | Edited on 2020-01-30 | In deep learning | Comments:

Encoder-Decoder

大多数注意力模型都是在Encoder-Decoder框架下发挥作用,Encoder-Decoder模型一般可以用来做机器翻译、文本摘要生成、问答系统、聊天机器人等。

Read more »

NLP中的对抗训练

Posted on 2019-11-17 | Edited on 2020-02-02 | In NLP | Comments:

什么是对抗训练

对抗训练(adversarial training),第一次由GAN之父 Ian Goodfellow在2015年的ICLR [2] 上提出,简单的来说就是在输入样本上加上一个扰动$r_{adv}$得到对抗样本,然后再用它做输入进行训练。用公式描述就是:

Read more »

Softmax + 交叉熵

Posted on 2019-11-10 | Edited on 2020-02-02 | In deep learning | Comments:

考虑一个广义的Softmax函数,q的logits为其中是温度,这是从统计力学中的玻尔兹曼分布中借用的概念。容易证明,当温度趋向0时,softmax输出将收敛为one-hot向量,温度趋向无穷时,输出更「软」。

Read more »

评价指标

Posted on 2019-11-10 | Edited on 2020-02-02 | In machine learning | Comments:

混淆矩阵

真阳性TP:prediction为1,且标签也为1,预测正确✅

Read more »

信息熵

Posted on 2019-11-09 | Edited on 2020-01-31 | In machine learning | Comments:

信息量

事件发生的概率越小,信息量越大。

假设$
X
$是一个离散型随机变量,取值集合为$
\chi
$,概率分布函数为

Read more »

Normalization

Posted on 2019-11-06 | Edited on 2020-02-02 | In deep learning | Comments:

Batch size的影响

使用mini-batch训练时,batch size的影响,目前可以实验证实的是:batch size 设置得较小训练出来的模型相对大batch size训练出的模型泛化能力更强,在测试集上的表现更好,而太大的batch size往往不太work,而且泛化能力较差。但是背后是什么原因造成的,目前还未有定论。

Read more »

PyTorch文本分类

Posted on 2019-10-27 | Edited on 2020-01-30 | In deep learning | Comments:

文本分类是NLP领域的较为容易的入门问题,本文记录我自己在做文本分类任务以及复现相关论文时的基本流程,绝大部分操作都使用了torch和torchtext两个库。

1. 文本数据预处理

Read more »

Flask数据库篇

Posted on 2019-02-18 | Edited on 2019-11-16 | In Flask | Comments:

定义模型Flask-SQLAlchemy是Flask的一个数据库框架。 创建一个SQLAlchemy类的实例,表示应用使用的数据库,通过它可以获得Flask-SQLAlchemy提供的所有功能。from flask_sqlalchemy import SQLAlchemyapp = Flask(__ ...

Read more »
<i class="fa fa-angle-left" aria-label="Previous page"></i>1234<i class="fa fa-angle-right" aria-label="Next page"></i>
TianHongZXY

TianHongZXY

浪漫骑士 行吟诗人 自由思想者

36 posts
6 categories
9 tags
GitHub E-Mail 知乎
© 2019 – 2022 TianHongZXY