Skip to content

Commit

Permalink
Cleanups related to removing factory from BERT init calls
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Kornuta <[email protected]>
  • Loading branch information
tkornuta-nvidia committed Feb 4, 2020
1 parent e59fcdb commit 720f5c5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion examples/asr/notebooks/2_Online_ASR_Microphone_Demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@
"data_layer = AudioDataLayer()\n",
"\n",
"data_preprocessor = nemo_asr.AudioToMelSpectrogramPreprocessor(\n",
" factory=neural_factory,\n",
" **model_definition['AudioToMelSpectrogramPreprocessor'])\n",
"\n",
"jasper_encoder = nemo_asr.JasperEncoder(\n",
Expand Down
4 changes: 2 additions & 2 deletions examples/nlp/joint_intent_slot_with_bert.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@
"""
if args.bert_checkpoint and args.bert_config:
pretrained_bert_model = nemo.collections.nlp.nm.trainables.common.huggingface.BERT(
config_filename=args.bert_config, factory=nf
config_filename=args.bert_config
)
pretrained_bert_model.restore_from(args.bert_checkpoint)
else:
pretrained_bert_model = nemo.collections.nlp.nm.trainables.common.huggingface.BERT(
pretrained_model_name=args.pretrained_bert_model, factory=nf
pretrained_model_name=args.pretrained_bert_model
)

hidden_size = pretrained_bert_model.hidden_size
Expand Down
2 changes: 1 addition & 1 deletion examples/tts/tacotron2.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def create_train_dag(

# Callbacks needed to print info to console and Tensorboard
train_callback = nemo.core.SimpleLossLoggerCallback(
tensors=[loss_t, spec_target, mel_postnet, gate, gate_target, alignments,],
tensors=[loss_t, spec_target, mel_postnet, gate, gate_target, alignments],
print_func=lambda x: nemo.logging.info(f"Loss: {x[0].data}"),
log_to_tb_func=partial(tacotron2_log_to_tb_func, log_images=True, log_images_freq=log_freq),
tb_writer=neural_factory.tb_writer,
Expand Down

0 comments on commit 720f5c5

Please sign in to comment.