未验证 提交 cd118000 编写于 作者: W whs 提交者: GitHub

Fix import in windows. (#153)

上级 912a81fb
...@@ -8,10 +8,10 @@ import math ...@@ -8,10 +8,10 @@ import math
import time import time
import numpy as np import numpy as np
import paddle.fluid as fluid import paddle.fluid as fluid
sys.path[0] = os.path.join(os.path.dirname("__file__"), os.path.pardir)
from paddleslim.prune import Pruner, save_model from paddleslim.prune import Pruner, save_model
from paddleslim.common import get_logger from paddleslim.common import get_logger
from paddleslim.analysis import flops from paddleslim.analysis import flops
sys.path.append(sys.path[0] + "/../")
import models import models
from utility import add_arguments, print_arguments from utility import add_arguments, print_arguments
......
...@@ -8,8 +8,8 @@ import math ...@@ -8,8 +8,8 @@ import math
import time import time
import numpy as np import numpy as np
import paddle.fluid as fluid import paddle.fluid as fluid
sys.path.append(sys.path[0] + "/../../../") sys.path[0] = os.path.join(
sys.path.append(sys.path[0] + "/../../") os.path.dirname("__file__"), os.path.pardir, os.path.pardir)
from paddleslim.common import get_logger from paddleslim.common import get_logger
from paddleslim.analysis import flops from paddleslim.analysis import flops
from paddleslim.quant import quant_aware, quant_post, convert from paddleslim.quant import quant_aware, quant_post, convert
......
...@@ -20,7 +20,8 @@ import functools ...@@ -20,7 +20,8 @@ import functools
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
sys.path.append('../../') sys.path[0] = os.path.join(
os.path.dirname("__file__"), os.path.pardir, os.path.pardir)
import imagenet_reader as reader import imagenet_reader as reader
from utility import add_arguments, print_arguments from utility import add_arguments, print_arguments
......
...@@ -8,9 +8,9 @@ import math ...@@ -8,9 +8,9 @@ import math
import time import time
import numpy as np import numpy as np
import paddle.fluid as fluid import paddle.fluid as fluid
sys.path.append(sys.path[0] + "/../../../") sys.path[0] = os.path.join(
os.path.dirname("__file__"), os.path.pardir, os.path.pardir)
from paddleslim.common import get_logger from paddleslim.common import get_logger
sys.path.append(sys.path[0] + "/../../")
import models import models
from utility import add_arguments, print_arguments from utility import add_arguments, print_arguments
......
...@@ -9,10 +9,10 @@ import time ...@@ -9,10 +9,10 @@ import time
import numpy as np import numpy as np
import paddle.fluid as fluid import paddle.fluid as fluid
sys.path.append(sys.path[0] + "/../../../") sys.path[0] = os.path.join(
os.path.dirname("__file__"), os.path.pardir, os.path.pardir)
from paddleslim.common import get_logger from paddleslim.common import get_logger
from paddleslim.quant import quant_post from paddleslim.quant import quant_post
sys.path.append(sys.path[0] + "/../../")
from utility import add_arguments, print_arguments from utility import add_arguments, print_arguments
import imagenet_reader as reader import imagenet_reader as reader
_logger = get_logger(__name__, level=logging.INFO) _logger = get_logger(__name__, level=logging.INFO)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册