Skip to content

Commit

Permalink
The whole project
Browse files Browse the repository at this point in the history
  • Loading branch information
andi611 committed Sep 21, 2018
1 parent 16eb6a0 commit ed995e3
Show file tree
Hide file tree
Showing 181 changed files with 455,865 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
Binary file added cornell_movie_dialog_corpus/.DS_Store
Binary file not shown.
Binary file added data/.DS_Store
Binary file not shown.
Binary file added data/map_idx2word.pkl
Binary file not shown.
Binary file added data/map_word2idx.pkl
Binary file not shown.
443,232 changes: 443,232 additions & 0 deletions data/processed_corpus.txt

Large diffs are not rendered by default.

Binary file added data/train_decode.pkl
Binary file not shown.
Binary file added data/train_encode.pkl
Binary file not shown.
Binary file added files/.DS_Store
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/presentation.key/Data/1-4291.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/presentation.key/Data/1-small-4292.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/presentation.key/Data/2-4306.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/presentation.key/Data/2-small-4307.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/presentation.key/Data/3-4315.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/presentation.key/Data/3-small-4316.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/presentation.key/Data/4-4363.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/presentation.key/Data/4-small-4365.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file added files/presentation.key/Index.zip
Binary file not shown.
9 changes: 9 additions & 0 deletions files/presentation.key/Metadata/BuildVersionHistory.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<string>Template: Showroom (2015-09-16 11:52)</string>
<string>M6.6.1-2560-1</string>
<string>M7.3.1-5249-2</string>
</array>
</plist>
1 change: 1 addition & 0 deletions files/presentation.key/Metadata/DocumentIdentifier
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9333E508-7DCC-48E4-AF96-C66012FD5A86
Binary file added files/presentation.key/Metadata/Properties.plist
Binary file not shown.
Binary file added files/presentation.key/preview-micro.jpg
Binary file added files/presentation.key/preview-web.jpg
Binary file added files/presentation.key/preview.jpg
Binary file added files/presentation.pdf
Binary file not shown.
Binary file added files/report.docx
Binary file not shown.
Binary file added files/report.pdf
Binary file not shown.
Binary file added image/1.PNG
Binary file added image/2.PNG
Binary file added image/3.PNG
Binary file added image/4.PNG
Binary file added image/dialog_demo1.png
Binary file added image/dialog_demo2.png
Binary file added image/framework.png
Binary file added image/gan_training_loss.png
Binary file added image/mc_rollout.png
Binary file added image/pre_train_loss.png
Binary file added image/training_process.png
Binary file added model/.DS_Store
Binary file not shown.
Binary file added model/gan_train-400.index
Binary file not shown.
Binary file added model/history_loss-340.pkl
Binary file not shown.
Binary file added model/history_loss-400.pkl
Binary file not shown.
Binary file added model/pre_train-340.index
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added reference_code/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

# =========================
# Operating System Files
# =========================

# OSX
# =========================

.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Adversarial-Learning-for-Neural-Dialogue-Generation-in-Tensorflow

the paper: Adversarial Learning for Neural Dialogue Generation https://arxiv.org/pdf/1701.06547.pdf


the paper translation in Chinese :http://blog.csdn.net/liuyuemaicha/article/details/60581187
## Config:

TensorFlow 0.12.0 Python 2.7

## Introduction to Project: al_neural_dialogue

### 1.


gen_data:   training data for gen model

disc_data:   training data for disc model

disc:       code about disc model

gen:         code about gen model

utils:       code about data operation and model config

**notice:**

**gen_data** include chitchat.train.answer, chitchat.train.query, chitchat.dev.answer, chitchat.dev.query (total four files)

**disc_data** include disc.dev.answer,disc.dev.query, disc.dev.gen 和 disc.train.answer, disc.train.query,disc.tran.gen (total six files)

**formula of training data** one sentence one row and splited with space, eg: i don ' t want to !


### 2.run


python al_neural_dialogue_train.py


**introduction**


def main(_):

'''

  # step_1 training gen model


# gen_pre_train()

# model test
# gen_test()

# step_2 gen training data for disc
# gen_disc()

# step_3 training disc model
# disc_pre_train()

# step_4 training al model
# al_train()

# model test
# gen_test()
'''

**model introduction**

1、disc model : hierarchical rnn (paper——Building end-to-end dialogue systems using generative hierarchical neural network models)

2、gen model : seq2seq model with attention (GRU cell)

3、method of reward : Monte Carlo Search

4、optimal:Policy Gradient

Loading

0 comments on commit ed995e3

Please sign in to comment.