提交 855cba84 编写于 作者: W wjj19950828

add run_dynamic switch

上级 41b51c34
...@@ -48,7 +48,7 @@ settings.register_profile( ...@@ -48,7 +48,7 @@ settings.register_profile(
derandomize=True, derandomize=True,
report_multiple_bugs=False) report_multiple_bugs=False)
if float(os.getenv('TEST_NUM_PERCENT_CASES', default='1.0')) < 1 or \ if float(os.getenv('TEST_NUM_PERCENT_CASES', default='1.0')) < 1 or \
os.getenv('HYPOTHESIS_TEST_PROFILE', 'dev') == 'ci': os.getenv('HYPOTHESIS_TEST_PROFILE', 'dev') == 'ci':
settings.load_profile("ci") settings.load_profile("ci")
else: else:
settings.load_profile("dev") settings.load_profile("dev")
......
...@@ -189,12 +189,12 @@ class ONNXConverter(object): ...@@ -189,12 +189,12 @@ class ONNXConverter(object):
paddle_tensor_feed = list() paddle_tensor_feed = list()
for i in range(len(self.input_feed)): for i in range(len(self.input_feed)):
paddle_numpy_feed.append(self.input_feed[self.inputs_name[i]]) paddle_numpy_feed.append(self.input_feed[self.inputs_name[i]])
paddle_tensor_feed.append(paddle.to_tensor(self.input_feed[self.inputs_name[i]])) paddle_tensor_feed.append(
paddle.to_tensor(self.input_feed[self.inputs_name[i]]))
if self.run_dynamic: if self.run_dynamic:
paddle_path = os.path.join( paddle_path = os.path.join(self.pwd, self.name,
self.pwd, self.name, self.name + '_' + str(ver) + '_paddle/')
self.name + '_' + str(ver) + '_paddle/')
import sys import sys
sys.path.append(paddle_path) sys.path.append(paddle_path)
from x2paddle_code import main from x2paddle_code import main
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册