Browse Source

inference (distributed) dataparallel patch

removing the '.module' that comes from (distibuted)dataparallel state dict
master
Raul Puri 6 years ago
committed by GitHub
parent
commit
78d5150d83
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      inference.ipynb

+ 1
- 1
inference.ipynb View File

@ -98,7 +98,7 @@
"source": [ "source": [
"checkpoint_path = \"/home/scratch.adlr-gcf/audio_denoising/runs/TTS-Tacotron2-LJS-MSE-DRC-NoMaskPadding-Unsorted-Distributed-22khz/checkpoint_15500\"\n", "checkpoint_path = \"/home/scratch.adlr-gcf/audio_denoising/runs/TTS-Tacotron2-LJS-MSE-DRC-NoMaskPadding-Unsorted-Distributed-22khz/checkpoint_15500\"\n",
"model = load_model(hparams)\n", "model = load_model(hparams)\n",
"model.load_state_dict(torch.load(checkpoint_path)['state_dict'])\n",
"model.load_state_dict({k.replace('module.',''):v for k,v in torch.load(checkpoint_path)['state_dict'].items()})\n",
"model = model.module\n", "model = model.module\n",
"_ = model.eval()" "_ = model.eval()"
] ]

Loading…
Cancel
Save