mirror of
https://github.com/storytold/torchscript-models.git
synced 2026-10-19 07:42:59 +00:00
garbage uncommitted changes that will obscure next change
This commit is contained in:
@@ -48,36 +48,146 @@ def load(model_checkpoint_path):
|
||||
return (hps, model)
|
||||
|
||||
|
||||
#model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/pretrained.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/glow_tts_ljs_txlearn_arpabet_2020-06-01_G_1689.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/glow_tts_ljs_txlearn_arpabet_2020-06-01_G_2590.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/glow_tts_ljs_txlearn_arpabet_2020-06-01_G_3614.pth'
|
||||
# John Oliver training started at G_845 (started at Jun22 23:44)
|
||||
# Reportedly started sounding good at G_1189 (saved at Jun23 06:27)
|
||||
# 344 epochs * 461 clips = 158,584 clip iterations (403 minutes of training)
|
||||
# 344 epochs * 1968 seconds = 676,992 seconds iterated (403 minutes of training)
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/oliver/G_891.pth' # Oh god, that's awful
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/oliver/G_1168.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/oliver/G_1189.pth' # Much better, but lots of room for improvement
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/oliver/G_1652.pth' # Not much of an improvement (?)
|
||||
|
||||
# Queen started training at G_1110. (started at Jun23 16:41)
|
||||
# Still sounds bad at G_1436. (saved at Jun24 00:27)
|
||||
# 326 epochs * 88 clips = 28,688 clip iterations (646 minutes of training)
|
||||
# 326 epochs * 372 seconds = 121,272 seconds (646 minutes of training)
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/queen/G_1185.pth' # Still sounds exactly like LJS
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/queen/G_1203.pth'
|
||||
|
||||
|
||||
#model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/samuel-l-jackson/glow-tts_samuel_l_jackson_ljstx_2020.07.05_expr-1_chkpt-2444.pth'
|
||||
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/craig-ferguson/new/G_4682.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/craig-ferguson/old/G_2282.pth'
|
||||
|
||||
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/george-w-bush/G_1735.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/jimmy-carter/G_2391.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/jimmy-carter/glow-tts_jimmy_carter_ljstx_2020.07.05_expr-1_chkpt-2391.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/george-w-bush/G_1735.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/bill-nye/glow-tts_bill_nye_ljstx_2020.07.07_expr-1_chkpt-2510.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/judi-dench/G_4693.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/george-takei/G_4060.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/tom-hanks/G_3686.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/james-earl-jones/G_2573.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/samuel-l-jackson/2nd/G_4481.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/craig-ferguson/new/G_6204.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/david-cross/G_5029.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/samuel-l-jackson/2nd/G_5050.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/bryan-cranston/G_3606.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/craig-ferguson/new/G_7151.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/james-earl-jones/G_2573.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/samuel-l-jackson/2nd/G_5558.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/craig-ferguson/new/G_7657.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/hillary-clinton/G_2679.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/samuel-l-jackson/2nd/G_6808.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/david-cross/G_6791.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/hillary-clinton/2nd/G_5337.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/bryan-cranston/G_5916.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/david-cross/G_7425.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/samuel-l-jackson/2nd/G_7447.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/arnold-schwarzenegger/G_3812.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/tupac-shakur/2nd/G_3928.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/tupac-shakur/2nd/G_4925.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/arnold-schwarzenegger/G_5099.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/tupac-shakur/2nd/G_5128.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/tupac-shakur/2nd/G_5193.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/bryan-cranston/G_6838.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/hillary-clinton/2nd/G_6416.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/tupac-shakur/2nd/G_6341.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/tupac-shakur/glow-tts_tupac_shakur_ljstx_2020.07.16_expr-2_chkpt-6341.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/bryan-cranston/G_7792.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/craig-ferguson/new/G_7680.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/david-cross/G_7000.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/david-cross/G_4000.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/craig-ferguson/new/G_7680.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/neil-degrasse-tyson/glow-tts_neil_degrasse_tyson_ljstx_2020.07.05_expr-1_chkpt-2482.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/bryan-cranston/G_7795.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/hillary-clinton/2nd/G_7250.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/david-cross/G_9462.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/james-earl-jones/G_2573.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/samuel-l-jackson/2nd/G_9450.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/samuel-l-jackson/2nd/G_6000.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/samuel-l-jackson/2nd/G_4000.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/arnold-schwarzenegger/G_6955.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/peter-thiel/G_4252.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/john-oliver/2nd/G_4262.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/john-oliver/2nd/G_5046.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/peter-thiel/G_5072.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/arnold-schwarzenegger/G_8449.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/tupac-shakur/2nd/G_8238.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/larry-king/G_3783.pth' # Not yet...
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/j-k-simmons/G_3763.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/arnold-schwarzenegger/G_6955.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/arnold-schwarzenegger/G_8449.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/arnold-schwarzenegger/G_9024.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/tupac-shakur/2nd/G_8778.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/tom-hanks/G_3686.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/george-takei/G_4060.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/george-takei/G_2500.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/george-takei/G_3000.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/george-takei/G_2185.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/george-w-bush/G_1735.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/judi-dench/G_4693.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/judi-dench/G_3000.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/david-cross/G_9462.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/bryan-cranston/G_7795.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/neil-degrasse-tyson/glow-tts_neil_degrasse_tyson_ljstx_2020.07.05_expr-1_chkpt-2482.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/hillary-clinton/2nd/G_7250.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/james-earl-jones/G_2573.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/arnold-schwarzenegger/G_9045.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/craig-ferguson/new/G_7680.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/larry-king/G_4037.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/j-k-simmons/G_4017.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/john-oliver/2nd/G_5856.pth'
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/sam-altman/G_3654.pth' # Not quite
|
||||
model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/leonard-nimoy/G_3614.pth'
|
||||
|
||||
hps, glow_model = load(model_checkpoint_path)
|
||||
output_filename = 'glow_tts_ljs_txlearn_arpabet_2020-06-01_G_2590.torchjit'
|
||||
output_filename = 'glow_tts_ljs_txlearn_arpabet_2020-06-01_G_3614.torchjit'
|
||||
|
||||
#output_filename = 'glow-tts_solo_oliver_ljstx_2020.06.22_expr-1_chkpt-1189.torchjit'
|
||||
#output_filename = 'glow-tts_solo_reagan_ljstx_2020.06.22_expr-1_chkpt-1084.torchjit'
|
||||
#output_filename = 'glow-tts_solo_reagan_ljstx_2020.06.22_expr-1_chkpt-1406.torchjit'
|
||||
output_filename = 'OUTPUT/craig_ferguson_new.torchjit'
|
||||
output_filename = 'OUTPUT/glow-tts_neil_degrasse_tyson_ljstx_2020.07.05_expr-1_chkpt-2482.torchjit'
|
||||
output_filename = 'OUTPUT/glow-tts_jimmy_carter_ljstx_2020.07.05_expr-1_chkpt-2391.torchjit'
|
||||
output_filename = 'OUTPUT/glow-tts_bill_nye_ljstx_2020.07.07_expr-1_chkpt-2510.torchjit'
|
||||
output_filename = 'OUTPUT/glow-tts_tupac_shakur_ljstx_2020.07.16_expr-2_chkpt-6341.torchjit'
|
||||
output_filename = 'OUTPUT/arnold-a.torchjit'
|
||||
output_filename = 'OUTPUT/arnold-b.torchjit'
|
||||
output_filename = 'OUTPUT/arnold-c.torchjit'
|
||||
output_filename = 'OUTPUT/glow_tts_single_speaker.torchjit'
|
||||
|
||||
|
||||
cmu_dict = cmudict.CMUDict(hps.data.cmudict_path)
|
||||
|
||||
tst_stn = "This is a test of the machine learning model. How does this sound?"
|
||||
tst_stn = "This is a test of the machine learning model. How does this sound? This is some longer text to make sure long inputs work. It should be good."
|
||||
seq = text_to_sequence(tst_stn, ['english_cleaners'], cmu_dict)
|
||||
sequence = np.array(seq)[None, :] # NB: None adds a new axis.
|
||||
print("".join([symbols[c] for c in sequence[0]]))
|
||||
#print("".join([symbols[c] for c in sequence[0]]))
|
||||
|
||||
torched = torch.from_numpy(sequence)
|
||||
|
||||
x_tst = torch.autograd.Variable(torched).long()
|
||||
x_tst_lengths = torch.tensor([x_tst.shape[1]])
|
||||
|
||||
print('\n tst_stn', len(tst_stn), tst_stn)
|
||||
print('\n seq', len(seq), seq)
|
||||
print('\n sequence', len(sequence), sequence.size, sequence)
|
||||
print('\n torched', len(torched), torched.shape, torched)
|
||||
|
||||
print('\n x_tst', len(x_tst), x_tst)
|
||||
print('\n x_tst_lengths', len(x_tst_lengths), x_tst_lengths)
|
||||
#print('\n tst_stn', len(tst_stn), tst_stn)
|
||||
#print('\n seq', len(seq), seq)
|
||||
#print('\n sequence', len(sequence), sequence.size, sequence)
|
||||
#print('\n torched', len(torched), torched.shape, torched)
|
||||
|
||||
#print('\n x_tst', len(x_tst), x_tst)
|
||||
#print('\n x_tst_lengths', len(x_tst_lengths), x_tst_lengths)
|
||||
|
||||
# NB: Tracing evaluates the model on input and unrolls and hardcodes branching
|
||||
# and loops. Scripting allows these to remain by converting the entire program
|
||||
@@ -97,4 +207,7 @@ else:
|
||||
container = torch.jit.script(glow_model)
|
||||
container.save(output_filename)
|
||||
|
||||
print('Input: {}'.format(model_checkpoint_path))
|
||||
print('Output: {}'.format(output_filename))
|
||||
print('Done.')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user