Skip to content

Commit

Permalink
Bug fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
oadams committed Apr 6, 2018
1 parent 3fc7f39 commit e616919
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions persephone/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import tensorflow as tf

from . import preprocess
from .preprocess import labels
from . import utils
from . import config
from .exceptions import PersephoneException
Expand Down Expand Up @@ -47,7 +47,7 @@ def dense_to_human_readable(dense_repr, index_to_label):

def decode(model_path_prefix: Union[str, Path],
input_paths: Sequence[Path],
labels: Set[str]) -> List[List[str]]:
label_set: Set[str]) -> List[List[str]]:

model_path_prefix = str(model_path_prefix)

Expand Down Expand Up @@ -75,7 +75,7 @@ def decode(model_path_prefix: Union[str, Path],
dense_decoded = sess.run("SparseToDense:0", feed_dict=feed_dict)

# Create a human-readable representation of the decoded.
indices_to_labels = preprocess.labels.make_indices_to_labels(labels)
indices_to_labels = labels.make_indices_to_labels(label_set)
human_readable = dense_to_human_readable(dense_decoded, indices_to_labels)

return human_readable
Expand Down
3 changes: 1 addition & 2 deletions persephone/tests/experiments/test_na.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from persephone import config
from persephone import model
from persephone import results
from persephone import run
from persephone import corpus_reader
from persephone import rnn_ctc
from persephone import experiment
Expand All @@ -27,7 +26,7 @@
# it should have a txt extension.
TEST_PER_FN = "test/test_per"

def set_up_base_testing_dir():
def set_up_base_testing_dir(data_base_dir=DATA_BASE_DIR):
""" Creates a directory to store corpora and experimental directories used
in testing. """

Expand Down

0 comments on commit e616919

Please sign in to comment.