资源算法skip-thought-tf

skip-thought-tf

2020-01-06 | |  36 |   0 |   0

skip-thought-tf

An implementation of skip-thought vectors in Tensorflow

Usage

from skipthought import SkipthoughtModelfrom skipthought.data_utils import TextDatafrom 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:        ....


上一篇:skip-thoughts.torch

下一篇:skip-thoughts-tfidf

用户评价
全部评价

热门资源

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...