Skip to content

An implementation of skip-thought vectors in Tensorflow

License

Notifications You must be signed in to change notification settings

xusong123/skip-thought-tf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

skip-thought-tf

An implementation of skip-thought vectors in Tensorflow

Usage

from skipthought import SkipthoughtModel
from skipthought.data_utils import TextData
from skipthought.utils import seq2seq_triples_data_iterator

model = SkipthoughtModel(...)

td = TextData("path/to/data")
lines = td.dataset

prev, curr, next = td.make_triples(lines)
it = td.triples_data_iterator(prev, curr, next, td.max_len, batch_size)

with tf.Session() as sess:
    init = tf.initialize_all_variables()
    sess.run(init)
    
    for enc_inp, prev_inp, prev_targ, next_inp, next_targ in it:
        ....
    

About

An implementation of skip-thought vectors in Tensorflow

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%