2021-03-26 17:54:28 +03:00
|
|
|
# Copyright (C) 2018-2021 Intel Corporation
|
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2018-10-16 13:45:03 +03:00
|
|
|
|
2019-08-09 19:02:42 +03:00
|
|
|
from mo.graph.graph import Graph
|
2018-10-16 13:45:03 +03:00
|
|
|
from mo.ops.op import Op
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Activation(Op):
|
|
|
|
|
op = 'Activation'
|
|
|
|
|
|
2019-04-12 18:25:53 +03:00
|
|
|
def __init__(self, graph: Graph, attrs: dict):
|
2018-10-16 13:45:03 +03:00
|
|
|
super().__init__(graph, {
|
|
|
|
|
'type': __class__.op,
|
|
|
|
|
'op': __class__.op,
|
2019-08-09 19:02:42 +03:00
|
|
|
'infer': None,
|
2019-04-12 18:25:53 +03:00
|
|
|
'in_ports_count': 1,
|
|
|
|
|
'out_ports_count': 1,
|
2018-10-16 13:45:03 +03:00
|
|
|
}, attrs)
|
|
|
|
|
|
|
|
|
|
def supported_attrs(self):
|
|
|
|
|
return ['operation']
|
|
|
|
|
|
|
|
|
|
def backend_attrs(self):
|
|
|
|
|
return [('type', 'operation'), 'alpha'] # operation --> type
|