提交 a11acfac 编写于 作者: O ouyangyu

Replace import oneflow with single_client

上级 3c73a8b7
......@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
import oneflow as flow
import oneflow.compatible.single_client as flow
def _get_kernel_initializer(data_format="NCHW"):
......
......@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
import oneflow as flow
import oneflow.compatible.single_client as flow
def _get_kernel_initializer():
......
......@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
import oneflow as flow
import oneflow.compatible.single_client as flow
def _default_config(args):
......
......@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
import oneflow as flow
import oneflow.compatible.single_client as flow
# ref : https://arxiv.org/pdf/1801.04381.pdf
# ref : https://github.com/liangfu/mxnet-mobilenet-v2/blob/master/symbols/mobilenetv2.py
......
......@@ -28,7 +28,7 @@ configs.print_args(args)
from util import Snapshot, InitNodes, Metric
import ofrecord_util
from job_function_util import get_train_config, get_val_config
import oneflow as flow
import oneflow.compatible.single_client as flow
import vgg_model
import resnet_model
import resnext_model
......
......@@ -24,8 +24,8 @@ parser = configs.get_parser()
args = parser.parse_args()
configs.print_args(args)
import oneflow as flow
import oneflow.typing as tp
import oneflow.compatible.single_client as flow
import oneflow.compatible.single_client.typing as tp
from imagenet1000_clsidx_to_labels import clsidx_2_labels
import resnet_model
......
......@@ -15,7 +15,7 @@ limitations under the License.
"""
import os
import math
import oneflow as flow
import oneflow.compatible.single_client as flow
import ofrecord_util
import optimizer_util
import config as configs
......
......@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
import oneflow as flow
import oneflow.compatible.single_client as flow
def add_ofrecord_args(parser):
......
......@@ -13,7 +13,7 @@ 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.
"""
import oneflow as flow
import oneflow.compatible.single_client as flow
import math
import pprint
......
......@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
import oneflow as flow
import oneflow.compatible.single_client as flow
BLOCK_COUNTS = [3, 4, 6, 3]
BLOCK_FILTERS = [256, 512, 1024, 2048]
......
......@@ -18,8 +18,8 @@ import time
from typing import Callable, Text
import numpy as np
import oneflow as flow
import oneflow.typing as tp
import oneflow.compatible.single_client as flow
import oneflow.compatible.single_client.typing as tp
import onnx
import onnxruntime as ort
......
......@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
import oneflow as flow
import oneflow.compatible.single_client as flow
import collections
......
......@@ -19,7 +19,7 @@ import time
import numpy as np
import pandas as pd
from datetime import datetime
import oneflow as flow
import oneflow.compatible.single_client as flow
def InitNodes(args):
......
......@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
import oneflow as flow
import oneflow.compatible.single_client as flow
def _batch_norm(inputs, name=None, trainable=True, training=True, data_format="NCHW"):
......
......@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
import argparse
import oneflow as flow
import oneflow.compatible.single_client as flow
import datetime
import os
import glob
......
......@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
import argparse
import oneflow as flow
import oneflow.compatible.single_client as flow
import datetime
import os
import glob
......
......@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
import argparse
import oneflow as flow
import oneflow.compatible.single_client as flow
import datetime
import os
import glob
......
......@@ -13,7 +13,7 @@ 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.
"""
import oneflow as flow
import oneflow.compatible.single_client as flow
import numpy as np
import imageio
import glob
......
......@@ -13,8 +13,7 @@ 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.
"""
import oneflow as flow
import oneflow.python.framework.distribute as distribute_util
import oneflow.compatible.single_client as flow
def get_const_initializer():
return flow.constant_initializer(0.002)
......
......@@ -13,8 +13,7 @@ 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.
"""
import oneflow as flow
import oneflow.core.common.data_type_pb2 as data_type_util
import oneflow.compatible.single_client as flow
import oneflow.core.operator.op_conf_pb2 as op_conf_util
import math
......
......@@ -13,9 +13,8 @@ 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.
"""
import oneflow as flow
import oneflow.compatible.single_client as flow
import bert as bert_util
import oneflow.core.operator.op_conf_pb2 as op_conf_util
def GlueBERT(
......
......@@ -13,7 +13,7 @@ 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.
"""
import oneflow as flow
import oneflow.compatible.single_client as flow
import bert as bert_util
import oneflow.core.operator.op_conf_pb2 as op_conf_util
......
......@@ -18,7 +18,7 @@ import os
import math
import numpy as np
import oneflow as flow
import oneflow.compatible.single_client as flow
from classifier import GlueBERT
from util import Snapshot, InitNodes, Metric, CreateOptimizer, GetFunctionConfig
......
......@@ -19,7 +19,7 @@ import argparse
from datetime import datetime
import config as configs
import oneflow as flow
import oneflow.compatible.single_client as flow
from pretrain import PreTrain
from util import Snapshot, InitNodes, Metric, CreateOptimizer, GetFunctionConfig
......
......@@ -21,7 +21,7 @@ from datetime import datetime
import config as configs
from config import str2bool
import oneflow as flow
import oneflow.compatible.single_client as flow
from squad import SQuAD
from util import Snapshot, InitNodes, Metric, CreateOptimizer, GetFunctionConfig
......
......@@ -13,9 +13,8 @@ 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.
"""
import oneflow as flow
import oneflow.compatible.single_client as flow
import bert as bert_util
import oneflow.core.operator.op_conf_pb2 as op_conf_util
def SQuAD(
......
......@@ -20,7 +20,7 @@ import numpy as np
from collections import OrderedDict
import pandas as pd
from datetime import datetime
import oneflow as flow
import oneflow.compatible.single_client as flow
def InitNodes(args):
......
import oneflow as flow
import oneflow.compatible.single_client as flow
from oneflow_gpt import distribute
from oneflow_gpt.config import get_args
......
import contextlib
import oneflow as flow
import oneflow.compatible.single_client as flow
from oneflow_gpt.config import get_args
......
import math
import numpy as np
import oneflow as flow
import oneflow.compatible.single_client as flow
from oneflow_gpt import distribute
from oneflow_gpt.config import get_args
......
import oneflow as flow
import oneflow.compatible.single_client as flow
def get_lr_scheduler(args):
......
......@@ -2,7 +2,7 @@ import os
import re
import glob
import operator
import oneflow as flow
import oneflow.compatible.single_client as flow
class Snapshot(object):
......
......@@ -6,7 +6,7 @@ sys.path.append(
)
import numpy as np
import oneflow as flow
import oneflow.compatible.single_client as flow
from oneflow_gpt.config import get_args
from oneflow_gpt import distribute
......
......@@ -10,7 +10,7 @@ from oneflow_gpt.model import GPTModel, ParallelSparseSoftmaxCrossEntropyLoss
from oneflow_gpt import util
from .datasets import build_dataset
import numpy as np
import oneflow as flow
import oneflow.compatible.single_client as flow
def _init_env(args):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册