Open mechi33 opened 6 years ago
By prediction, do you mean predicting whether an audio is noisy or not? (discriminator) Or, do you mean denoising? (generator) Either case, you can load the models saved at the end of every epoch using torch.load()
.
discriminator = torch.load('discriminator-5.pkl')
output = discriminator(audio)
Thank you very much for your kind reply. I tried your code below and face error.
gen=torch.load('generator-7.pkl')
nois_data='p232_001.wav'
output=gen(nois_data)
TypeError: 'collections.OrderedDict' object is not callable
Could you give some advice on this?
Thanks,
My bad. Since we're saving the .state_dict()
, you should load the state_dict.
# the model should have all parameters loaded
model.load_state_dict('generator-7.pkl')
Hi, thank you for the nice implementation.
Regarding predict, should I use Tensorflow original version? (https://github.com/santi-pdp/segan/blob/master/main.py)
Your REDADME explain only about training, so let me confirm how to predict the model.
Regards,