Skip to content

Commit 0bd8e24

Browse files
authored
Merge pull request tensorflow#1217 from cshallue/master
Update the encoding instructions
2 parents b78e63f + 8af6f0e commit 0bd8e24

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

skip_thoughts/README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ import numpy as np
398398
import os.path
399399
import scipy.spatial.distance as sd
400400
from skip_thoughts import configuration
401-
from skip_thoughts import combined_encoder
401+
from skip_thoughts import encoder_manager
402402

403403
In [1]:
404404
# Set paths to the model.
@@ -411,15 +411,15 @@ MR_DATA_DIR = "/dir/containing/mr/data"
411411

412412
In [2]:
413413
# Set up the encoder. Here we are using a single unidirectional model.
414-
# To use a bidirectional model as well, call load_encoder() again with
415-
# configuration.ModelConfig(bidirectional_encoder=True) and paths to the
414+
# To use a bidirectional model as well, call load_model() again with
415+
# configuration.model_config(bidirectional_encoder=True) and paths to the
416416
# bidirectional model's files. The encoder will use the concatenation of
417417
# all loaded models.
418-
encoder = combined_encoder.CombinedEncoder()
419-
encoder.load_encoder(configuration.ModelConfig(),
420-
vocabulary_file=VOCAB_FILE,
421-
embedding_matrix_file=EMBEDDING_MATRIX_FILE,
422-
checkpoint_path=CHECKPOINT_PATH)
418+
encoder = encoder_manager.EncoderManager()
419+
encoder.load_model(configuration.model_config(),
420+
vocabulary_file=VOCAB_FILE,
421+
embedding_matrix_file=EMBEDDING_MATRIX_FILE,
422+
checkpoint_path=CHECKPOINT_PATH)
423423

424424
In [3]:
425425
# Load the movie review dataset.

0 commit comments

Comments
 (0)