Replies: 1 comment
-
I think it's just a little code hack to reuse the same class instance again for generation. (real experts: correct me if i'm wrong) at inference time you can also just create the underlying SemanticTransformerWrapper yourself using yourNewSemanticTransformer.load_state_dict(YOUR_SAVED_TRAINED_MODEL_HERE) as the transformer param. then you can call that thing's generate method, shedding the much larger trainer class. that's what i did hope that helps! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a naive/silly question, and based on the answer I get I'll submit a PR to address my confusion (either with a comment that explains, or fixing the example)...
In the main readme instructions, when giving an example for how to train the SemanticTransformerTrainer [1], I noticed that num_train_steps is set to 1.
Is this intentional? (i.e. is there just some basic conversion going on from the underlying wave2vec/hubert model?)
Or is this just a poor example? (i.e. you'd never actually train with just 1 step, but the reader/me should have gotten the idea?)
The similar example below it that includes text conditioning does have a much higher value set. So I wondered whether training more than 1 steps was only necessary with text conditioning?
Thanks in advance for any insight you can provide!
[1]
trainer = SemanticTransformerTrainer(
transformer = semantic_transformer,
wav2vec = wav2vec,
folder = '/home/phil/dl/data/LibriSpeech',
batch_size = 1,
data_max_length = 320 * 32,
num_train_steps = 1
)
Beta Was this translation helpful? Give feedback.
All reactions