提交 840cf780 编写于 作者: X Xin Pan

add deprecation warning.

test=develop
上级 6724be2b
......@@ -92,6 +92,11 @@ class ParallelExecutor(object):
num_trainers=1,
trainer_id=0,
scope=None):
sys.stderr.write(
'ParallelExecutor is deprecated. '
'Please use CompiledProgram and Executor. CompiledProgram '
'is a central place for optimization and Executor is the '
'unified executor. Example can be found in compiler.py.\n')
# step1: get places, the places are used in run too.
self._places = []
if use_cuda:
......
......@@ -15,6 +15,7 @@
from __future__ import print_function
import os
import sys
import numpy as np
from .. import core
from ..framework import Program
......@@ -50,6 +51,7 @@ class InferenceTranspiler(object):
place (Place): inference place
scope (Scope|None): inference Scope
'''
sys.stderr.write('InferenceTranspiler is deprecated.\n')
if not isinstance(program, Program):
raise TypeError("program should be as Program type")
if not isinstance(place, core.CPUPlace) and not isinstance(
......
......@@ -15,6 +15,7 @@
from __future__ import print_function
import six
import sys
from collections import defaultdict, MutableSet
from .. import core
from ... import compat as cpt
......@@ -509,6 +510,7 @@ def memory_optimize(input_program,
Returns:
None
"""
sys.stderr.write('memory_optimize is deprecated.\n')
def to_name_str(var):
if isinstance(var, Variable):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册