Merge pull request #15134 from wopeizl/windows/whlsupport

fix the whl issue test=develop
revert-15207-remove_op_handle_lock_and_fix_var
wopeizl 6 years ago committed by GitHub
commit 796322d31a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -102,13 +102,6 @@ def __bootstrap__():
import sys
import os
import platform
if os.name == 'nt':
third_lib_path = os.path.abspath(os.path.dirname(
__file__)) + os.sep + '..' + os.sep + 'libs'
os.environ['path'] += ';' + third_lib_path
sys.path.append(third_lib_path)
from . import core
in_test = 'unittest' in sys.modules

@ -26,6 +26,13 @@ import numpy as np
from .. import compat as cpt
from .proto import framework_pb2
try:
if os.name == 'nt':
import sys
third_lib_path = os.path.abspath(os.path.dirname(
__file__)) + os.sep + '..' + os.sep + 'libs'
os.environ['path'] += ';' + third_lib_path
sys.path.append(third_lib_path)
from . import core
except ImportError as e:
if os.name == 'nt':

@ -29,6 +29,12 @@ def train(network, use_cuda, use_parallel_executor, batch_size=32, pass_num=2):
print('Skip use_cuda=True because Paddle is not compiled with cuda')
return
if use_parallel_executor and os.name == 'nt':
print(
'Skip use_parallel_executor=True because Paddle comes without parallel support on windows'
)
return
word_dict = paddle.dataset.imdb.word_dict()
train_reader = paddle.batch(
paddle.dataset.imdb.train(word_dict), batch_size=batch_size)

Loading…
Cancel
Save