diff --git a/mindinsight/mindconverter/graph_based_converter/mapper/impl/ops/cos_mapper.py b/mindinsight/mindconverter/graph_based_converter/mapper/impl/ops/cos_mapper.py new file mode 100644 index 00000000..8fef5ca6 --- /dev/null +++ b/mindinsight/mindconverter/graph_based_converter/mapper/impl/ops/cos_mapper.py @@ -0,0 +1,32 @@ +# Copyright 2021 Huawei Technologies Co., Ltd.All Rights Reserved. +# +# 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. +# ============================================================================== +"""Mapper module.""" +from mindinsight.mindconverter.graph_based_converter.mapper.base import ONNXToMindSporeMapper + + +class CosMapper(ONNXToMindSporeMapper): + """Cos mapper.""" + + @staticmethod + def _operation_name_in_ms(*args, **kwargs): + return "P.Cos" + + @staticmethod + def _convert_params(**kwargs): + return dict() + + @staticmethod + def _convert_trained_weights(**kwargs): + return dict() diff --git a/mindinsight/mindconverter/graph_based_converter/mapper/impl/ops/sin_mapper.py b/mindinsight/mindconverter/graph_based_converter/mapper/impl/ops/sin_mapper.py new file mode 100644 index 00000000..d16d8ead --- /dev/null +++ b/mindinsight/mindconverter/graph_based_converter/mapper/impl/ops/sin_mapper.py @@ -0,0 +1,32 @@ +# Copyright 2021 Huawei Technologies Co., Ltd.All Rights Reserved. +# +# 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. +# ============================================================================== +"""Mapper module.""" +from mindinsight.mindconverter.graph_based_converter.mapper.base import ONNXToMindSporeMapper + + +class SinMapper(ONNXToMindSporeMapper): + """Sin mapper.""" + + @staticmethod + def _operation_name_in_ms(*args, **kwargs): + return "P.Sin" + + @staticmethod + def _convert_params(**kwargs): + return dict() + + @staticmethod + def _convert_trained_weights(**kwargs): + return dict() diff --git a/mindinsight/mindconverter/graph_based_converter/mapper/onnx_to_ms.json b/mindinsight/mindconverter/graph_based_converter/mapper/onnx_to_ms.json index f088edd6..19dcaa9e 100644 --- a/mindinsight/mindconverter/graph_based_converter/mapper/onnx_to_ms.json +++ b/mindinsight/mindconverter/graph_based_converter/mapper/onnx_to_ms.json @@ -38,5 +38,7 @@ "onnx::LSTM": "mindinsight.mindconverter.graph_based_converter.mapper.impl.nn.lstm_mapper.LSTMMapper", "onnx::Squeeze": "mindinsight.mindconverter.graph_based_converter.mapper.impl.ops.squeeze_mapper.SqueezeMapper", "onnx::Floor": "mindinsight.mindconverter.graph_based_converter.mapper.impl.ops.floor_mapper.FloorMapper", - "onnx::CumSum": "mindinsight.mindconverter.graph_based_converter.mapper.impl.ops.cumsum_mapper.CumSumMapper" + "onnx::CumSum": "mindinsight.mindconverter.graph_based_converter.mapper.impl.ops.cumsum_mapper.CumSumMapper", + "onnx::Sin": "mindinsight.mindconverter.graph_based_converter.mapper.impl.ops.sin_mapper.SinMapper", + "onnx::Cos": "mindinsight.mindconverter.graph_based_converter.mapper.impl.ops.cos_mapper.CosMapper" } \ No newline at end of file