Commit 8af6f0e2 authored by Christopher Shallue's avatar Christopher Shallue
Browse files

Update the encoding instructions

parent 72ea0623
...@@ -411,15 +411,15 @@ MR_DATA_DIR = "/dir/containing/mr/data" ...@@ -411,15 +411,15 @@ MR_DATA_DIR = "/dir/containing/mr/data"
In [2]: In [2]:
# Set up the encoder. Here we are using a single unidirectional model. # Set up the encoder. Here we are using a single unidirectional model.
# To use a bidirectional model as well, call load_encoder() again with # To use a bidirectional model as well, call load_model() again with
# configuration.ModelConfig(bidirectional_encoder=True) and paths to the # configuration.model_config(bidirectional_encoder=True) and paths to the
# bidirectional model's files. The encoder will use the concatenation of # bidirectional model's files. The encoder will use the concatenation of
# all loaded models. # all loaded models.
encoder = encoder_manager.EncoderManager() encoder = encoder_manager.EncoderManager()
encoder.load_encoder(configuration.ModelConfig(), encoder.load_model(configuration.model_config(),
vocabulary_file=VOCAB_FILE, vocabulary_file=VOCAB_FILE,
embedding_matrix_file=EMBEDDING_MATRIX_FILE, embedding_matrix_file=EMBEDDING_MATRIX_FILE,
checkpoint_path=CHECKPOINT_PATH) checkpoint_path=CHECKPOINT_PATH)
In [3]: In [3]:
# Load the movie review dataset. # Load the movie review dataset.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment