Skip to main content

Sequence estimators for Tensorflow

Project description


Sequence estimators for TensorFlow.

Available estimators

  • FullSequenceClassifier: one class for a whole sequence
  • FullSequenceRegressor: one value for a whole sequence
  • SequenceItemsClassifier: one class for each sequence item
  • SequenceItemsRegressor: one value for each sequence item


from tfseqestimator import FullSequenceClassifier, RnnType
import tensorflow.contrib.feature_column as contrib_features

token_sequence = contrib_features.sequence_categorical_column_with_hash_bucket(...)
token_emb = contrib_features.embedding_column(categorical_column=token_sequence, ...)

estimator = FullSequenceClassifier(
    rnn_layers=[32, 16]

# Input builders
def input_fn_train: # returns x, y
estimator.train(input_fn=input_fn_train, steps=100)

def input_fn_eval: # returns x, y
metrics = estimator.evaluate(input_fn=input_fn_eval, steps=10)

def input_fn_predict: # returns x, None
predictions = estimator.predict(input_fn=input_fn_predict)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tfseqestimator-2.1.1.tar.gz (30.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page