mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-09 01:52:41 +00:00
add meta-data embedding_dim to RNNLM onnx-model (#1026)
This commit is contained in:
parent
2767b9ff11
commit
298ed4520f
@ -232,6 +232,7 @@ def export_with_state(
|
|||||||
L = 20
|
L = 20
|
||||||
num_layers = model.rnn.num_layers
|
num_layers = model.rnn.num_layers
|
||||||
hidden_size = model.rnn.hidden_size
|
hidden_size = model.rnn.hidden_size
|
||||||
|
embedding_dim = model.rnn.embedding_dim
|
||||||
|
|
||||||
x = torch.randint(low=1, high=params.vocab_size, size=(N, L), dtype=torch.int64)
|
x = torch.randint(low=1, high=params.vocab_size, size=(N, L), dtype=torch.int64)
|
||||||
y = torch.randint(low=1, high=params.vocab_size, size=(N, L), dtype=torch.int64)
|
y = torch.randint(low=1, high=params.vocab_size, size=(N, L), dtype=torch.int64)
|
||||||
@ -278,6 +279,7 @@ def export_with_state(
|
|||||||
"vocab_size": str(params.vocab_size),
|
"vocab_size": str(params.vocab_size),
|
||||||
"num_layers": str(num_layers),
|
"num_layers": str(num_layers),
|
||||||
"hidden_size": str(hidden_size),
|
"hidden_size": str(hidden_size),
|
||||||
|
"embedding_dim": str(embedding_dim),
|
||||||
"url": "https://huggingface.co/ezerhouni/icefall-librispeech-rnn-lm",
|
"url": "https://huggingface.co/ezerhouni/icefall-librispeech-rnn-lm",
|
||||||
}
|
}
|
||||||
logging.info(f"meta_data: {meta_data}")
|
logging.info(f"meta_data: {meta_data}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user