* Add CTCGreedyDecoder mo support * Update copiright * Update bom file * Add transformation * Fix code style * Fix according to review * Add CTCGreedyDecoder v6 to ConvertPrecision * Hot fix * Add replasment for ctc_greedy_decoder * Fix test * Fix * Update ie transform * Draft ctc lost replaser * Add ctcloss replaser * Update * Refactoring code * Update transformation * Update decoder * Remove comments * Convert seq mask from int to float * Fix unit test * Add dynamic tests * Refactoring code * Fix py code style * update style * Disable ctcgreedydecoder transform for mkldnn plugin * Add some comments * Add transfor code comments * Enable transform from differend plagins * Fix mo * fix tests * Fix comment * Fix convert precition * Update comment * Fix prcition * Refactoring according to reviw * Add ir reder extender * Rename transformation * Update bom file * Fix mo replacer * Fix tests * Move transform to decomp * Add check blank_index * Rafactoring ctcloss * Change dinemic rank check * Fix ctclos extractor * Remove comment * Fix code style * Refactoring pattern matcher for transformation CTCGreedyDecoder * Disavle transform for vpu * Refactoring according to review * Refactoring code * Disable transformation for cldnn * Remove unused code * Reverse transfomation * Fix code style * Hot fix transform * Fix unit tests * Update transform * Enable transform in common pipline * Fix names replasments for mo transformations * Hot fix * Fix
31 lines
1.0 KiB
Python
31 lines
1.0 KiB
Python
"""
|
|
Copyright (C) 2018-2021 Intel Corporation
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
"""
|
|
from extensions.ops.ctc_greedy_decoder_seq_len import CTCGreedyDecoderSeqLenOp
|
|
from mo.front.extractor import FrontExtractorOp
|
|
|
|
|
|
class CTCCGreedyDecoderFrontExtractor(FrontExtractorOp):
|
|
op = 'CTCGreedyDecoder'
|
|
enabled = True
|
|
|
|
@classmethod
|
|
def extract(cls, node):
|
|
attrs = {
|
|
'merge_repeated': bool(node.pb.attr['merge_repeated'].b),
|
|
}
|
|
CTCGreedyDecoderSeqLenOp.update_node_stat(node, attrs)
|
|
return cls.enabled
|