iLampard / time_dependent_rnn

Tensorflow Implementation of Time Dependent Representation of Neural Event Sequence Prediction

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

time_dependent_rnn

In order to practise Tensorflow, I implement the model of Time Dependent Representation of Neural Event Sequence Prediction based on my own understanding.

How to run

Download sample data

Download three pickles from Baidu Disk with password fn40 and put them under tdrnn/data/data_so.

tdrnn
 |__ data
       |__ data_so
            |__ valid.pkl
            |__ test.pkl
            |__ train.pkl

Please be noted that these data is preprocessed by my own and not exactly the same one used in the paper.

Run the training and prediction pipeline

Suppose we want to run 200 epochs and use Tensorboard to visualize the process

cd tdrnn
python main.py --write_summary True --max_epoch 200

To check the description of all flags

python main.py -helpful

To open tensorboard

tensorboard --logdir=path

where the path can be found in the log which shows the relative dir to save the model, e.g. logs/data_so/ModelWrapper/lr-0.01_dim-64_drop-0.0/20200201-011244 /saved_model/tfb_dir/.

and then open the browser

Requirement

tensorflow==1.13.1

About

Tensorflow Implementation of Time Dependent Representation of Neural Event Sequence Prediction

License:Apache License 2.0


Languages

Language:Python 100.0%