* added Kaldi dropoutmask extraction and Kaldi lstmNonlinearity replacer extended for dropout case
(cherry picked from commit 0dd05f8053)
* fixed frame time calculation for Kaldi models with shapeof branches
* fix bug in frame time calculation for Kaldi models with shapeOf paths
* remove incorrect attribute from transformation
* refactoring based on review, couple more checks
* minor review fixes
22 lines
568 B
Python
22 lines
568 B
Python
# Copyright (C) 2018-2021 Intel Corporation
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
from mo.graph.graph import Graph
|
|
from mo.ops.op import Op
|
|
|
|
|
|
class LstmNonLinearity(Op):
|
|
"""
|
|
"""
|
|
op = 'LstmNonLinearity'
|
|
|
|
def __init__(self, graph: Graph, attrs: dict):
|
|
super().__init__(graph, {
|
|
'op': __class__.op,
|
|
'use_dropout': False,
|
|
'type': None, # type is None because this operation should not appear in IR
|
|
'infer': None,
|
|
'in_ports_count': 1,
|
|
'out_ports_count': 1,
|
|
}, attrs)
|