diff --git a/paddleslim/nas/darts/search_space/conv_bert/reader/cls.py b/paddleslim/nas/darts/search_space/conv_bert/reader/cls.py index 60bd5505066827e457424345ea11b2758680b03d..79b487719569f64ece8a15ef959a9c36a691c824 100644 --- a/paddleslim/nas/darts/search_space/conv_bert/reader/cls.py +++ b/paddleslim/nas/darts/search_space/conv_bert/reader/cls.py @@ -17,8 +17,8 @@ import os import types import csv import numpy as np -import tokenization -from batching import prepare_batch_data +from . import tokenization +from .batching import prepare_batch_data class DataProcessor(object): diff --git a/paddleslim/nas/darts/train_search.py b/paddleslim/nas/darts/train_search.py index 57cc944b4b8308dcd8f33de381e8ee9dbc7ddcbd..38a6a3c9b3a76a2159e7a040b415c9ed497b64b8 100644 --- a/paddleslim/nas/darts/train_search.py +++ b/paddleslim/nas/darts/train_search.py @@ -20,7 +20,6 @@ __all__ = ['DARTSearch', 'count_parameters_in_MB'] import os import logging -from itertools import izip import numpy as np import paddle.fluid as fluid from paddle.fluid.dygraph.base import to_variable @@ -107,7 +106,7 @@ class DARTSearch(object): self.model.train() step_id = 0 - for train_data, valid_data in izip(train_loader(), valid_loader()): + for train_data, valid_data in zip(train_loader(), valid_loader()): if epoch >= self.epochs_no_archopt: architect.step(train_data, valid_data) diff --git a/paddleslim/teachers/bert/reader/cls.py b/paddleslim/teachers/bert/reader/cls.py index e05f02a3a99dc9aeaae88c8f7f6d6986c9b0121c..23d62d5c49ce9648e5bccd39b179b5153cfa0c1b 100644 --- a/paddleslim/teachers/bert/reader/cls.py +++ b/paddleslim/teachers/bert/reader/cls.py @@ -17,8 +17,8 @@ import os import types import csv import numpy as np -import tokenization -from batching import prepare_batch_data +from . import tokenization +from .batching import prepare_batch_data class DataProcessor(object):