|
|
@ -15,6 +15,7 @@
|
|
|
|
from __future__ import print_function
|
|
|
|
from __future__ import print_function
|
|
|
|
|
|
|
|
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
|
|
|
|
import sys
|
|
|
|
import numpy as np
|
|
|
|
import numpy as np
|
|
|
|
from .. import core
|
|
|
|
from .. import core
|
|
|
|
from ..framework import Program
|
|
|
|
from ..framework import Program
|
|
|
@ -50,6 +51,9 @@ class InferenceTranspiler(object):
|
|
|
|
place (Place): inference place
|
|
|
|
place (Place): inference place
|
|
|
|
scope (Scope|None): inference Scope
|
|
|
|
scope (Scope|None): inference Scope
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
|
|
sys.stderr.write("InferenceTranspiler is deprecated since it's not "
|
|
|
|
|
|
|
|
"safe. Users should be "
|
|
|
|
|
|
|
|
"responsible for constructing the inference program\n")
|
|
|
|
if not isinstance(program, Program):
|
|
|
|
if not isinstance(program, Program):
|
|
|
|
raise TypeError("program should be as Program type")
|
|
|
|
raise TypeError("program should be as Program type")
|
|
|
|
if not isinstance(place, core.CPUPlace) and not isinstance(
|
|
|
|
if not isinstance(place, core.CPUPlace) and not isinstance(
|
|
|
|