From e1af0ecd1fc239a05fbec4dbcde6952113bcaa81 Mon Sep 17 00:00:00 2001 From: Ed Jaras Date: Fri, 28 Feb 2020 05:57:55 +0900 Subject: [PATCH] Refactored operators. (#532) --- blueoil/converter/core/operators/__init__.py | 22 +++++++++++++++++++ .../core/{operators.py => operators/base.py} | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 blueoil/converter/core/operators/__init__.py rename blueoil/converter/core/{operators.py => operators/base.py} (99%) diff --git a/blueoil/converter/core/operators/__init__.py b/blueoil/converter/core/operators/__init__.py new file mode 100644 index 000000000..67da49d4e --- /dev/null +++ b/blueoil/converter/core/operators/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# Copyright 2019 The Blueoil Authors. 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. +# ============================================================================= +from .base import Operator, Conv, Pool, MaxPool, AveragePool, Add, Gemm, Mul,\ + Maximum, MatMul, Minimum, Identity, BatchNormalization, Dropout, Gather,\ + Unique, Cast, Prod, BatchNormalizationOptimized, Softmax, Relu, LeakyRelu,\ + Quantizer, QTZ_binary_mean_scaling, QTZ_linear_mid_tread_half,\ + QTZ_binary_channel_wise_mean_scaling, Lookup, SpaceToDepth, Transpose,\ + Reshape, Flatten, ConcatOnDepth, DepthToSpace, ResizeNearestNeighbor,\ + Split, Pad, Shape, StridedSlice, Variable, Input, Constant, Output diff --git a/blueoil/converter/core/operators.py b/blueoil/converter/core/operators/base.py similarity index 99% rename from blueoil/converter/core/operators.py rename to blueoil/converter/core/operators/base.py index 732ef6be4..a4a877d1e 100644 --- a/blueoil/converter/core/operators.py +++ b/blueoil/converter/core/operators/base.py @@ -25,7 +25,7 @@ from blueoil.converter.core.view import View from blueoil.converter.util import classproperty -from .data_types import * +from blueoil.converter.core.data_types import * if TYPE_CHECKING: import blueoil.converter.core.operators as ops