Comments (1)
Ad-hoc fix was:
- reorder the function calls in prepare_graph():
self.get_consts()
# check inputs and outputs
self.fetch_inputs_outputs()
#self.reorder_nodes()
self.update_nodes_by_name()
self.add_cache_nodes()
self.fetch_inputs_outputs()
# add PadContext for 'input' if the model has left or right context
# fuse statistics extraction and pooling, lstm cell
self.fuse_nodes()
self.add_cache_nodes()
self.fetch_inputs_outputs()
self.fetch_model_inputs_outputs()
self.reorder_nodes(False)
- changes in reorder_nodes():
...
while len(nodes_need_check) > 0:
for node in list(nodes_need_check):
...
if set(depend_inputs) <= set(checked_names) \
or (node.type == KaldiOpType.IfDefined.name
and ifdefine and 'IfDefined' in node.inputs[-1]):
...
- changes in add_cache_nodes():
cache_nodes = list()
for node in self._nodes:
input = node.inputs[-1]
if node.type == KaldiOpType.IfDefined.name and \
not input.endswith('.IfDefined'):
_LOG.info(f"Appending cache nodes {node.inputs[-1]}")
if input in self._nodes_by_name:
input_node = self._nodes_by_name[input]
cache_node_name = input_node.name + '.Cache'
cache_inputs = [input_node.name]
cache_node = make_node(cache_node_name,
KaldiOpType.Identity.name,
cache_inputs,
[cache_node_name])
cache_nodes.append(cache_node)
node.inputs = node.inputs[:-1]
node.inputs.append(cache_node_name + '.IfDefined')
else:
cache_node_name = input + '.Cache'
cache_inputs = [input]
cache_node = make_node(cache_node_name,
KaldiOpType.Identity.name,
cache_inputs,
[cache_node_name])
node.inputs = node.inputs[:-1]
node.inputs.append(cache_node_name + '.IfDefined')
cache_nodes.append(cache_node)
if len(cache_nodes) > 0:
self._nodes.extend(cache_nodes)
self.fetch_inputs_outputs()
self.reorder_nodes()
from kaldi-onnx.
Related Issues (20)
- ReplaceIndex and Splice
- Error when validate model with DynamicLSTM node
- Can I delete this parameter? --raw=true is error when run nnet3-copy HOT 1
- 在voxceleb模型中,提取x-vector不是在最后的输出log-softmax层 HOT 2
- Mace does not support onnx op type Tdnn yet HOT 2
- 问一下目前这个转换工具是不是不支持kaldi的TimeHeightConvolutionComponent? HOT 1
- convert中的参数问题
- Exception Error: invalid output indexes values HOT 1
- Please state exactly what version of Python is required HOT 1
- ValueError: could not convert string to float: '<BiasParams>' HOT 1
- Conversion fail for subsampling > 1 HOT 3
- 转换模型时的--left-context和--right-context如何设置?
- how to set the --left-context and --right-context when converting the model
- UnicodeDecodeError: 'ascii' codec can't decode byte 0x80
- Undefined local variable
- 转.mdl为.onnx时,chunksize怎么设置
- Kaldi转onnx完成后,onnx里出现Splice算子
- Kaldi声学模型onnx启动报错 Fatal error: Gemm is not a registered function/op
- spec augment component not supported
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 kaldi-onnx.