Skip to content

Commit 53f1a57

Browse files
committed
✍️ update contextnet tpu script
1 parent 6d3f451 commit 53f1a57

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/contextnet/train_tpu_keras_subword_contextnet.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
from tensorflow_asr.configs.config import Config
5858
from tensorflow_asr.datasets.keras import ASRTFRecordDatasetKeras
5959
from tensorflow_asr.featurizers.speech_featurizers import TFSpeechFeaturizer
60-
from tensorflow_asr.featurizers.text_featurizers import SubwordFeaturizer, SentencePieceFeaturizer
60+
from tensorflow_asr.featurizers.text_featurizers import TFSubwordFeaturizer, SentencePieceFeaturizer
6161
from tensorflow_asr.models.keras.contextnet import ContextNet
6262
from tensorflow_asr.optimizers.schedules import TransformerSchedule
6363

@@ -69,10 +69,10 @@
6969
text_featurizer = SentencePieceFeaturizer.load_from_file(config.decoder_config, args.subwords)
7070
elif args.subwords and os.path.exists(args.subwords):
7171
print("Loading subwords ...")
72-
text_featurizer = SubwordFeaturizer.load_from_file(config.decoder_config, args.subwords)
72+
text_featurizer = TFSubwordFeaturizer.load_from_file(config.decoder_config, args.subwords)
7373
else:
7474
print("Generating subwords ...")
75-
text_featurizer = SubwordFeaturizer.build_from_corpus(
75+
text_featurizer = TFSubwordFeaturizer.build_from_corpus(
7676
config.decoder_config,
7777
corpus_files=args.subwords_corpus
7878
)

0 commit comments

Comments
 (0)