Spaces:
Sleeping
Sleeping
| import torch | |
| from numpy import finfo | |
| from model import Tacotron2 | |
| from hparams import create_hparams | |
| def load_model(hparams): | |
| model = Tacotron2(hparams) | |
| if hparams.fp16_run: | |
| model.decoder.attention_layer.score_mask_value = finfo('float16').min | |
| return model | |