Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
joey0922 authored Mar 22, 2022
1 parent 8df2db7 commit 25e621e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ In the paper above, it presented three different adversaries as follows:

[FGSM](https://arxiv.org/abs/1412.6572), short for Fast Gradient Sign Method, is summarized below:

![FGSM](C:\Users\Joey\Desktop\workspace\同花顺测试\FGSM.PNG)
![FGSM](https://github.com/joey0922/Adversarial-Train-TextCNN-Pytorch/tree/main/PNG/FGSM.PNG)

The pseudo code above tells us that for each input x, how FGSM performs adversarial attack:

@@ -38,7 +38,7 @@ The pseudo code above tells us that for each input x, how FGSM performs adversar

The pseudo code of "Free" is as followings:

![free](C:\Users\Joey\Desktop\workspace\同花顺测试\free.PNG)
![free](https://github.com/joey0922/Adversarial-Train-TextCNN-Pytorch/tree/main/PNG/free.PNG)

It can be regarded that Free adversarial repeats several FGSM attacks in one batch of x:

@@ -78,7 +78,7 @@ It can be regarded that Free adversarial repeats several FGSM attacks in one bat

PGD adversarial training updates perturbation $\delta$ N times before update model weights:

![PGD](C:\Users\Joey\Desktop\workspace\同花顺测试\PGD.PNG)
![PGD](https://github.com/joey0922/Adversarial-Train-TextCNN-Pytorch/tree/main/PNG/PGD.PNG)

The steps are as followings:

@@ -145,4 +145,4 @@ Inputs of model are characters of texts, and the pre-trained character embedding
* [fast_adversarial](https://github.com/locuslab/fast_adversarial)
* [Chinese-Text-Classification-Pytorch](https://github.com/649453932/Chinese-Text-Classification-Pytorch)
* [知乎专栏:【炼丹技巧】功守道:NLP中的对抗训练 + PyTorch实现](https://zhuanlan.zhihu.com/p/91269728)
* [知乎专栏:一文搞懂NLP中的对抗训练](https://zhuanlan.zhihu.com/p/103593948)
* [知乎专栏:一文搞懂NLP中的对抗训练](https://zhuanlan.zhihu.com/p/103593948)

0 comments on commit 25e621e

Please sign in to comment.