#include "Op/Dropout.h"
#include "Op/Gather.h"
#include "Op/Gemm.h"
-#include "Op/GivenTensorFill.h"
#include "Op/GlobalAveragePool.h"
#include "Op/Max.h"
#include "Op/MaxPool.h"
registry.registerConverter("Dropout", stdex::make_unique<DropoutNodeConverter>());
registry.registerConverter("Gather", stdex::make_unique<GatherNodeConverter>());
registry.registerConverter("Gemm", stdex::make_unique<GemmNodeConverter>());
- registry.registerConverter("GivenTensorFill", stdex::make_unique<GivenTensorFillNodeConverter>());
registry.registerConverter("GlobalAveragePool",
stdex::make_unique<GlobalAveragePoolNodeConverter>());
registry.registerConverter("Max", stdex::make_unique<MaxNodeConverter>());
+++ /dev/null
-/*
- * Copyright (c) 2019 Samsung Electronics 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.
- */
-
-#include "GivenTensorFill.h"
-
-#include "ONNXHelpers.h"
-
-#include "mir/TensorVariant.h"
-
-#include "mir/ops/ConstantOp.h"
-
-namespace mir_onnx
-{
-
-void GivenTensorFillNodeConverter::convert(const onnx::NodeProto &onnx_node,
- ConverterContext *context) const
-{
- std::vector<mir::Operation::Output *> inputs = context->getNodeInputs(onnx_node);
- mir::Graph *graph = context->getGraph();
- auto values_att = findAttribute(onnx_node, "values");
- auto shape_att = findAttribute(onnx_node, "shape");
- assert(values_att && shape_att);
- assert(values_att->floats_size() > 0 && shape_att->ints_size() > 0);
- mir::Shape shape(shape_att->ints_size());
- for (int i = 0; i < shape_att->ints_size(); i++)
- shape.dim(i) = shape_att->ints(i);
- mir::TensorVariant tensor(mir::DTYPE::FLOAT32, shape, values_att->floats().data());
- // TODO Check right removing input_tensors
- // input_tensors.insert(std::make_pair(onnx_node.output(0), tensor));
- auto result = createOp<mir::ops::ConstantOp>(graph, tensor)->getOutput(0);
-
- context->setNodeOutputs(onnx_node, {result});
-}
-
-} // namespace mir_onnx
+++ /dev/null
-/*
- * Copyright (c) 2019 Samsung Electronics 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.
- */
-
-#include "ONNXNodeConverterRegistry.h"
-
-namespace mir_onnx
-{
-
-class GivenTensorFillNodeConverter : public NodeConverter
-{
-public:
- void convert(const onnx::NodeProto &onnx_node, ConverterContext *context) const override;
-};
-
-} // namespace mir_onnx