Module: contrib.seq2seq

Module: tf.contrib.seq2seq

Module tf.contrib.seq2seq

Defined in tensorflow/contrib/seq2seq/__init__.py.

Ops for building neural network seq2seq decoders and losses.

See the Seq2seq Library (contrib) guide.

Classes

class AttentionMechanism

class AttentionWrapper: Wraps another RNNCell with attention.

class AttentionWrapperState: namedtuple storing the state of a AttentionWrapper.

class BahdanauAttention: Implements Bhadanau-style (additive) attention.

class BasicDecoder: Basic sampling decoder.

class BasicDecoderOutput

class BeamSearchDecoder: BeamSearch sampling decoder.

class BeamSearchDecoderOutput

class BeamSearchDecoderState

class CustomHelper: Base abstract class that allows the user to customize sampling.

class Decoder: An RNN Decoder abstract interface object.

class FinalBeamSearchDecoderOutput: Final outputs returned by the beam search after all decoding is finished.

class GreedyEmbeddingHelper: A helper for use during inference.

class Helper: Interface for implementing sampling in seq2seq decoders.

class LuongAttention: Implements Luong-style (multiplicative) attention scoring.

class SampleEmbeddingHelper: A helper for use during inference.

class ScheduledEmbeddingTrainingHelper: A training helper that adds scheduled sampling.

class ScheduledOutputTrainingHelper: A training helper that adds scheduled sampling directly to outputs.

class TrainingHelper: A helper for use during training. Only reads inputs.

Functions

dynamic_decode(...): Perform dynamic decoding with decoder.

gather_tree(...): Calculates the full beams from the per-step ids and parent beam ids.

hardmax(...): Returns batched one-hot vectors.

sequence_loss(...): Weighted cross-entropy loss for a sequence of logits.

tile_batch(...): Tile the batch dimension of a (possibly nested structure of) tensor(s) t.

© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/contrib/seq2seq

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部