Comments (6)
Could you attach your config.pbtxt from encoder and feature_extractor?
Looks like the configuration file is not quite right.
from wenet.
attatched config.pbtxt files for encoder, feature_extractor.
- encoder config.pbtxt
config.pbtxt.txt
name: "encoder"
backend: "onnxruntime"
default_model_filename: "encoder.onnx"
max_batch_size: 512
sequence_batching{
max_sequence_idle_microseconds: 5000000
oldest {
max_candidate_sequences: 1024
max_queue_delay_microseconds: 5000
}
control_input [
]
state [
{
input_name: "offset"
output_name: "r_offset"
data_type: TYPE_INT64
dims: [ 1 ]
initial_state: {
data_type: TYPE_INT64
dims: [ 1 ]
zero_data: true
name: "initial state"
}
},
{
input_name: "att_cache"
output_name: "r_att_cache"
data_type: TYPE_FP16
dims: [ #num_layers, #num_head, #cache_size, #att_cache_output_size ]
initial_state: {
data_type: TYPE_FP16
dims: [ #num_layers, #num_head, #cache_size, #att_cache_output_size ]
zero_data: true
name: "initial state"
}
},
{
input_name: "cnn_cache"
output_name: "r_cnn_cache"
data_type: TYPE_FP16
dims: [#num_layers, 256, #cnn_module_cache]
initial_state: {
data_type: TYPE_FP16
dims: [#num_layers, 256, #cnn_module_cache]
zero_data: true
name: "initial state"
}
},
{
input_name: "cache_mask"
output_name: "r_cache_mask"
data_type: TYPE_FP16
dims: [1, #cache_size]
initial_state: {
data_type: TYPE_FP16
dims: [1, #cache_size]
zero_data: true
name: "initial state"
}
}
]
}
input [
{
name: "chunk_xs"
data_type: TYPE_FP16
dims: [#decoding_window, 80]
},
{
name: "chunk_lens"
data_type: TYPE_INT32
dims: [ 1 ]
reshape: { shape: [] }
}
]
output [
{
name: "log_probs"
data_type: TYPE_FP16
dims: [-1, 10] # [-1, beam_size]
},
{
name: "log_probs_idx"
data_type: TYPE_INT64
dims: [-1, 10] # [-1, beam_size]
},
{
name: "chunk_out"
data_type: TYPE_FP16
dims: [-1, -1]
},
{
name: "chunk_out_lens"
data_type: TYPE_INT32
dims: [1]
reshape: { shape: [] }
}
]
instance_group [
{
count: 2
kind: KIND_GPU
}
]
config_template.pbtxt.txt
config_template.pbtxt.txt
config_template2.pbtxt.txt
config_template2.pbtxt.txt
- feature_extractor config.pbtxt
config.pbtxt.txt
name: "feature_extractor"
backend: "python"
max_batch_size: 512
parameters [
{
key: "frame_length_ms",
value: { string_value: "#frame_length" }
},
{
key: "frame_shift_ms"
value: { string_value: "#frame_shift" }
},
{
key: "sample_rate"
value: { string_value: "#sample_rate" }
},
{
key: "chunk_size_s",
value: { string_value: "#chunk_size_in_seconds" }
}
]
sequence_batching{
max_sequence_idle_microseconds: 5000000
oldest {
max_candidate_sequences: 512
preferred_batch_size: [ 32, 64, 128, 256]
}
control_input [
{
name: "START",
control [
{
kind: CONTROL_SEQUENCE_START
fp32_false_true: [0, 1]
}
]
},
{
name: "READY"
control [
{
kind: CONTROL_SEQUENCE_READY
fp32_false_true: [0, 1]
}
]
},
{
name: "CORRID",
control [
{
kind: CONTROL_SEQUENCE_CORRID
data_type: TYPE_UINT64
}
]
},
{
name: "END",
control [
{
kind: CONTROL_SEQUENCE_END
fp32_false_true: [0, 1]
}
]
}
]
}
input [
{
name: "wav"
data_type: TYPE_FP32
dims: [-1]
},
{
name: "wav_lens"
data_type: TYPE_INT32
dims: [1]
}
]
output [
{
name: "speech"
data_type: TYPE_#DTYPE # FP32
dims: [#decoding_window, #num_mel_bins]
},
{
name: "speech_lengths"
data_type: TYPE_INT32
dims: [1]
}
]
instance_group [
{
count: 2
kind: KIND_GPU
}
]
model.py
model.py.txt
config_template.pbtxt.txt
config_template.pbtxt.txt
from wenet.
from wenet.
run the same command as above
-- python3 -m wenet.bin.export_onnx_gpu --config $EXP/train.yaml --checkpoint $EXP/final_10.pt --cmvn_file=$EXP/global_cmvn --ctc_weight=0.5 --output_onnx_dir $onnx_dir --fp16
from wenet.
run the same command as above -- python3 -m wenet.bin.export_onnx_gpu --config $EXP/train.yaml --checkpoint $EXP/final_10.pt --cmvn_file=$EXP/global_cmvn --ctc_weight=0.5 --output_onnx_dir $onnx_dir --fp16
Please also add --streaming
if you are using streaming model.
from wenet.
It works!!
from wenet.
Related Issues (20)
- wenet v3.1.0训练u2++_conformer结束内存buff无法清除,发生警告ResourceWarning。 HOT 1
- 请问大佬,如果想拿wenet encoder的结果去做下游任务,怎么做呢? HOT 3
- finetune whisper largeV3,and run in grpc server,got inference error.
- wenet2.2.1 recognize.py uses attention decoding method, the result is abnormal HOT 2
- 项目建议 HOT 6
- 【提问】需要一个char+bpe联合建模时tokenizer的yaml配置 HOT 4
- 在github中使用action 编译runtime报错 HOT 5
- 【Help needed】训练迭代一定step后开始频繁出现loss = nan的情况 HOT 4
- 在不能联网环境下编译onnxruntime,如何离线下载WeTextProcessing HOT 1
- Error Building Android Demo
- torch_ddp retraining from checkpoint , optimizer state does not resume from checkpoint. HOT 1
- Null Pointer Exception in Android Demo Project
- Differences of CPU and GPU in exporting onnx
- aishell2_u2pp_conformer_exp预训练权重转换成onnx后不出识别结果 HOT 2
- how to freeze decoder during fine-tuning?
- whisper script does not work HOT 1
- 请问为什么调用模型的model.forward_encoder_chunk(feats, 0, -1)函数生成结果维度与encoder的output_size不匹配 HOT 1
- efficonformer是否支持runtime解码? HOT 1
- train u2++ conformer : AssertionError assert offset + size <= self.max_len HOT 3
- 在redhat(x86,), gcc 5.1.0, cmake(3.14.7)编译失败
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wenet.