def extract(cls, node): data_type = tf_dtype_extractor(node.pb.attr["T"].type) AttributedPower.update_node_stat(node, { 'power': data_type(2), 'data_type': data_type }) return cls.enabled
def extract(cls, node: Node): scale = onnx_attr(node, 'scale', 'f', default=mo_array(1.0), dst_type=lambda x: mo_array(x)) AttributedPower.update_node_stat(node, {'scale': scale}) return cls.enabled
def extract(cls, node: Node): pb = node.pb assert pb, 'Protobuf layer can not be empty' param = pb.power_param attrs = { 'output_spatial_shape': None, 'power': param.power, 'scale': param.scale, 'shift': param.shift, } AttributedPower.update_node_stat(node, attrs) return cls.enabled
def extract(cls, node): AttributedPower.update_node_stat(node, {'power': 0.5}) return cls.enabled
def extract(cls, node: Node): AttributedPower.update_node_stat(node, {'scale': -1}) return cls.enabled
def extract(cls, node: Node): attrs = { 'power': node.module.exponent, } AttributedPower.update_node_stat(node, attrs) return cls.enabled
def extract(cls, node: Node): attrs = { 'power': 0.5, } AttributedPower.update_node_stat(node, attrs) return cls.enabled