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

Fix relative import in demo of pruning (#261)

上级 66be3a0c
......@@ -8,11 +8,10 @@ import math
import time
import numpy as np
import paddle.fluid as fluid
sys.path.append("../../")
from paddleslim.prune import load_model
from paddleslim.common import get_logger
from paddleslim.analysis import flops
sys.path.append(sys.path[0] + "/../")
sys.path[0] = os.path.join(os.path.dirname("__file__"), os.path.pardir)
import models
from utility import add_arguments, print_arguments
......
......@@ -11,7 +11,7 @@ import paddle.fluid as fluid
from paddleslim.prune import merge_sensitive, get_ratios_by_loss
from paddleslim.prune import sensitivity
from paddleslim.common import get_logger
sys.path.append(sys.path[0] + "/../")
sys.path[0] = os.path.join(os.path.dirname("__file__"), os.path.pardir)
import models
from utility import add_arguments, print_arguments
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册