未验证 提交 30387006 编写于 作者: N Nyakku Shigure 提交者: GitHub

[CodeStyle] remove all future import (#46411)

* [CodeStyle] remove all future import

* revert test_error.py

* restore future import in example code
上级 05ec0757

要显示的变更太多。

To preserve performance only 1000 of 1000+ files are displayed.
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from full_pascalvoc_test_preprocess import main_pascalvoc_preprocess from full_pascalvoc_test_preprocess import main_pascalvoc_preprocess
import numpy as np import numpy as np
import paddle.fluid.core as core import paddle.fluid.core as core
...@@ -23,6 +21,7 @@ import os ...@@ -23,6 +21,7 @@ import os
class Test_Preprocess(unittest.TestCase): class Test_Preprocess(unittest.TestCase):
def test_local_convert(self): def test_local_convert(self):
os.system("python full_pascalvoc_test_preprocess.py --choice=local") os.system("python full_pascalvoc_test_preprocess.py --choice=local")
......
...@@ -27,8 +27,6 @@ images per class. ...@@ -27,8 +27,6 @@ images per class.
""" """
from __future__ import print_function
import itertools import itertools
import numpy import numpy
import paddle.dataset.common import paddle.dataset.common
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import requests import requests
import hashlib import hashlib
import os import os
......
...@@ -20,8 +20,6 @@ dataset. And a pre-trained word vector model based on Wikipedia corpus is used ...@@ -20,8 +20,6 @@ dataset. And a pre-trained word vector model based on Wikipedia corpus is used
to initialize SRL model. to initialize SRL model.
""" """
from __future__ import print_function
import tarfile import tarfile
import gzip import gzip
import itertools import itertools
......
...@@ -29,8 +29,6 @@ http://www.robots.ox.ac.uk/~vgg/publications/papers/nilsback08.{pdf,ps.gz}. ...@@ -29,8 +29,6 @@ http://www.robots.ox.ac.uk/~vgg/publications/papers/nilsback08.{pdf,ps.gz}.
""" """
from __future__ import print_function
import itertools import itertools
import functools import functools
from .common import download from .common import download
......
...@@ -30,8 +30,6 @@ the image layout as follows. ...@@ -30,8 +30,6 @@ the image layout as follows.
be keep consistent between the training and inference period. be keep consistent between the training and inference period.
""" """
from __future__ import print_function
import six import six
import numpy as np import numpy as np
# FIXME(minqiyang): this is an ugly fix for the numpy bug reported here # FIXME(minqiyang): this is an ugly fix for the numpy bug reported here
......
...@@ -20,8 +20,6 @@ of 25,000 highly polar movie reviews for training, and 25,000 for testing. ...@@ -20,8 +20,6 @@ of 25,000 highly polar movie reviews for training, and 25,000 for testing.
Besides, this module also provides API for building dictionary. Besides, this module also provides API for building dictionary.
""" """
from __future__ import print_function
import paddle.dataset.common import paddle.dataset.common
import paddle.utils.deprecated as deprecated import paddle.utils.deprecated as deprecated
import collections import collections
......
...@@ -19,8 +19,6 @@ http://www.fit.vutbr.cz/~imikolov/rnnlm/ and parse training set and test set ...@@ -19,8 +19,6 @@ http://www.fit.vutbr.cz/~imikolov/rnnlm/ and parse training set and test set
into paddle reader creators. into paddle reader creators.
""" """
from __future__ import print_function
import paddle.dataset.common import paddle.dataset.common
import paddle.utils.deprecated as deprecated import paddle.utils.deprecated as deprecated
import collections import collections
......
...@@ -18,8 +18,6 @@ This module will download dataset from http://yann.lecun.com/exdb/mnist/ and ...@@ -18,8 +18,6 @@ This module will download dataset from http://yann.lecun.com/exdb/mnist/ and
parse training set and test set into paddle reader creators. parse training set and test set into paddle reader creators.
""" """
from __future__ import print_function
import paddle.dataset.common import paddle.dataset.common
import paddle.utils.deprecated as deprecated import paddle.utils.deprecated as deprecated
import gzip import gzip
......
...@@ -22,8 +22,6 @@ set and test set into paddle reader creators. ...@@ -22,8 +22,6 @@ set and test set into paddle reader creators.
""" """
from __future__ import print_function
import numpy as np import numpy as np
import zipfile import zipfile
import paddle.dataset.common import paddle.dataset.common
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import paddle.dataset.cifar import paddle.dataset.cifar
import unittest import unittest
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import paddle.dataset.flowers import paddle.dataset.flowers
import unittest import unittest
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import paddle.dataset.imdb import paddle.dataset.imdb
import unittest import unittest
import re import re
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import paddle.dataset.imikolov import paddle.dataset.imikolov
import unittest import unittest
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import paddle.dataset.mnist import paddle.dataset.mnist
import unittest import unittest
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import unittest import unittest
import numpy as np import numpy as np
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import paddle.dataset.voc2012 import paddle.dataset.voc2012
import unittest import unittest
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import paddle.dataset.wmt16 import paddle.dataset.wmt16
import unittest import unittest
......
...@@ -19,8 +19,6 @@ https://archive.ics.uci.edu/ml/machine-learning-databases/housing/ and ...@@ -19,8 +19,6 @@ https://archive.ics.uci.edu/ml/machine-learning-databases/housing/ and
parse training set and test set into paddle reader creators. parse training set and test set into paddle reader creators.
""" """
from __future__ import print_function
import numpy as np import numpy as np
import six import six
import tempfile import tempfile
......
...@@ -19,8 +19,6 @@ to training/test sets has been maintained. The total number of images ...@@ -19,8 +19,6 @@ to training/test sets has been maintained. The total number of images
with segmentation has been increased from 7,062 to 9,993. with segmentation has been increased from 7,062 to 9,993.
""" """
from __future__ import print_function
import tarfile import tarfile
import io import io
import numpy as np import numpy as np
......
...@@ -20,8 +20,6 @@ parse training set and test set into paddle reader creators. ...@@ -20,8 +20,6 @@ parse training set and test set into paddle reader creators.
""" """
from __future__ import print_function
import six import six
import tarfile import tarfile
import gzip import gzip
......
...@@ -28,8 +28,6 @@ Multi30K: Multilingual English-German Image Descriptions. ...@@ -28,8 +28,6 @@ Multi30K: Multilingual English-German Image Descriptions.
} }
""" """
from __future__ import print_function
import os import os
import six import six
import tarfile import tarfile
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
__all__ = [] __all__ = []
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import sys import sys
import paddle import paddle
import collections import collections
......
...@@ -54,8 +54,6 @@ launch a process on each of the given gpu card or cpu machine. ...@@ -54,8 +54,6 @@ launch a process on each of the given gpu card or cpu machine.
your_training_py (arg1 arg2 and all others) your_training_py (arg1 arg2 and all others)
""" """
from __future__ import print_function
import shutil import shutil
import sys import sys
import tempfile import tempfile
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import os import os
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import sys import sys
from paddle.optimizer import Optimizer from paddle.optimizer import Optimizer
from ...base.topology import ParallelMode from ...base.topology import ParallelMode
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import sys import sys
import paddle import paddle
from paddle.optimizer import Optimizer from paddle.optimizer import Optimizer
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import paddle import paddle
from paddle.fluid import program_guard, layers, default_main_program from paddle.fluid import program_guard, layers, default_main_program
from paddle.fluid import default_startup_program from paddle.fluid import default_startup_program
......
...@@ -11,8 +11,6 @@ ...@@ -11,8 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
from __future__ import print_function
from __future__ import division
import os import os
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -11,8 +11,6 @@ ...@@ -11,8 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
from __future__ import print_function
from __future__ import division
import os import os
import collections import collections
import numpy as np import numpy as np
......
...@@ -11,9 +11,6 @@ ...@@ -11,9 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
from __future__ import print_function
from __future__ import division
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import core, unique_name from paddle.fluid import core, unique_name
from .meta_optimizer_base import MetaOptimizerBase from .meta_optimizer_base import MetaOptimizerBase
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from functools import reduce from functools import reduce
import collections import collections
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function, division
import multiprocessing import multiprocessing
import os import os
import signal import signal
......
...@@ -19,8 +19,6 @@ ...@@ -19,8 +19,6 @@
# 'sampling_id', # 'sampling_id',
# 'Uniform'] # 'Uniform']
from __future__ import print_function
import math import math
import warnings import warnings
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import os import os
import sys import sys
import atexit import atexit
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import numpy as np import numpy as np
import warnings import warnings
""" """
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from .proto import framework_pb2 from .proto import framework_pb2
from paddle.fluid import framework as framework from paddle.fluid import framework as framework
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import copy import copy
import six import six
import warnings import warnings
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from . import decoder from . import decoder
from .decoder import * from .decoder import *
from . import memory_usage_calc from . import memory_usage_calc
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from . import beam_search_decoder from . import beam_search_decoder
from .beam_search_decoder import * from .beam_search_decoder import *
......
...@@ -20,8 +20,6 @@ without using the low level API such as while ops. ...@@ -20,8 +20,6 @@ without using the low level API such as while ops.
This API is still under active development and may change drastically. This API is still under active development and may change drastically.
""" """
from __future__ import print_function
from ...wrapped_decorator import signature_safe_contextmanager from ...wrapped_decorator import signature_safe_contextmanager
import numpy as np import numpy as np
import six import six
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from . import extend_optimizer_with_weight_decay from . import extend_optimizer_with_weight_decay
from .extend_optimizer_with_weight_decay import * from .extend_optimizer_with_weight_decay import *
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from . import nn from . import nn
from .nn import * from .nn import *
......
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
Contrib layers just related to metric. Contrib layers just related to metric.
""" """
from __future__ import print_function
import warnings import warnings
from paddle.fluid.layer_helper import LayerHelper from paddle.fluid.layer_helper import LayerHelper
from paddle.fluid.initializer import Normal, Constant from paddle.fluid.initializer import Normal, Constant
......
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
Contrib layers just related to the neural network. Contrib layers just related to the neural network.
""" """
from __future__ import print_function
import os import os
import six import six
import warnings import warnings
......
...@@ -20,8 +20,6 @@ batch size to fully utilize a GPU. ...@@ -20,8 +20,6 @@ batch size to fully utilize a GPU.
This API is still under active development and may change drastically. This API is still under active development and may change drastically.
""" """
from __future__ import print_function
import six import six
from .. import core from .. import core
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from . import decorator from . import decorator
from .decorator import * from .decorator import *
from . import fp16_lists from . import fp16_lists
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from . import amp_lists from . import amp_lists
from .amp_lists import * from .amp_lists import *
from . import amp_utils from . import amp_utils
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from .... import core from .... import core
from .... import framework from .... import framework
from .... import global_scope from .... import global_scope
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from ... import core from ... import core
from ... import framework from ... import framework
from ... import layers from ... import layers
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from collections import OrderedDict from collections import OrderedDict
from ..framework import Program from ..framework import Program
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from . import quantize_transpiler from . import quantize_transpiler
from .quantize_transpiler import * from .quantize_transpiler import *
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from . import quantization_pass from . import quantization_pass
from .quantization_pass import * from .quantization_pass import *
from . import quant_int8_mkldnn_pass from . import quant_int8_mkldnn_pass
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from . import qat from . import qat
from .qat import * from .qat import *
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# see the license for the specific language governing permissions and # see the license for the specific language governing permissions and
# limitations under the license. # limitations under the license.
from __future__ import print_function
import os import os
import six import six
import numpy as np import numpy as np
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# see the license for the specific language governing permissions and # see the license for the specific language governing permissions and
# limitations under the license. # limitations under the license.
from __future__ import print_function
import os import os
import numpy as np import numpy as np
import random import random
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# see the license for the specific language governing permissions and # see the license for the specific language governing permissions and
# limitations under the license. # limitations under the license.
from __future__ import print_function
import os import os
import numpy as np import numpy as np
import random import random
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# see the license for the specific language governing permissions and # see the license for the specific language governing permissions and
# limitations under the license. # limitations under the license.
from __future__ import print_function
import os import os
import numpy as np import numpy as np
import random import random
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# see the license for the specific language governing permissions and # see the license for the specific language governing permissions and
# limitations under the license. # limitations under the license.
from __future__ import print_function
import os import os
import numpy as np import numpy as np
import random import random
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# see the license for the specific language governing permissions and # see the license for the specific language governing permissions and
# limitations under the license. # limitations under the license.
from __future__ import print_function
import os import os
import numpy as np import numpy as np
import random import random
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# see the license for the specific language governing permissions and # see the license for the specific language governing permissions and
# limitations under the license. # limitations under the license.
from __future__ import print_function
import os import os
import numpy as np import numpy as np
import random import random
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# see the license for the specific language governing permissions and # see the license for the specific language governing permissions and
# limitations under the license. # limitations under the license.
from __future__ import print_function
import os import os
import numpy as np import numpy as np
import random import random
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# see the license for the specific language governing permissions and # see the license for the specific language governing permissions and
# limitations under the license. # limitations under the license.
from __future__ import print_function
import os import os
import numpy as np import numpy as np
import random import random
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import unittest import unittest
import numpy as np import numpy as np
import paddle import paddle
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from .utils import calculate_density from .utils import calculate_density
from .utils import check_mask_1d from .utils import check_mask_1d
from .utils import get_mask_1d from .utils import get_mask_1d
......
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
Utilities of Auto SParsity (ASP). Utilities of Auto SParsity (ASP).
""" """
from __future__ import print_function
import sys import sys
import math import math
import collections import collections
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import contextlib import contextlib
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import contextlib import contextlib
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import contextlib import contextlib
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import six import six
import unittest import unittest
from functools import partial from functools import partial
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import site import site
import sys import sys
import os import os
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from . import core from . import core
import numpy as np import numpy as np
import os import os
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from . import dataset from . import dataset
from .dataset import * from .dataset import *
......
...@@ -12,9 +12,6 @@ ...@@ -12,9 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from __future__ import division
import numpy as np import numpy as np
import math import math
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import paddle import paddle
from .. import framework from .. import framework
......
...@@ -12,9 +12,6 @@ ...@@ -12,9 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from __future__ import division
import numpy as np import numpy as np
from .. import core from .. import core
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import sys import sys
import six import six
import random import random
......
...@@ -26,8 +26,6 @@ A `scoped_function` will take a `function` as input. That function will be ...@@ -26,8 +26,6 @@ A `scoped_function` will take a `function` as input. That function will be
invoked in a new local scope. invoked in a new local scope.
""" """
from __future__ import print_function
import paddle.fluid.core import paddle.fluid.core
import threading import threading
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
# limitations under the License. # limitations under the License.
"""Defination of device workers.""" """Defination of device workers."""
from __future__ import print_function
__all__ = [ __all__ = [
'DeviceWorker', 'Hogwild', 'DownpourSGD', 'Section', 'DownpourSGDOPT', 'DeviceWorker', 'Hogwild', 'DownpourSGD', 'Section', 'DownpourSGDOPT',
'HeterSection' 'HeterSection'
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from . import base from . import base
from .base import * from .base import *
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from paddle.fluid.wrapped_decorator import signature_safe_contextmanager, wrap_decorator from paddle.fluid.wrapped_decorator import signature_safe_contextmanager, wrap_decorator
from paddle.fluid import core from paddle.fluid import core
import contextlib import contextlib
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from paddle.fluid import core from paddle.fluid import core
from paddle.fluid.dygraph import to_variable from paddle.fluid.dygraph import to_variable
from paddle.fluid.framework import _varbase_creator, _dygraph_tracer, dygraph_only from paddle.fluid.framework import _varbase_creator, _dygraph_tracer, dygraph_only
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import os import os
import collections import collections
import functools import functools
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from . import ast_transformer from . import ast_transformer
from .ast_transformer import * from .ast_transformer import *
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from paddle.utils import gast from paddle.utils import gast
from paddle.fluid.dygraph.dygraph_to_static.static_analysis import AstNodeWrapper from paddle.fluid.dygraph.dygraph_to_static.static_analysis import AstNodeWrapper
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
# gast is a generic AST to represent Python2 and Python3's Abstract Syntax Tree(AST). # gast is a generic AST to represent Python2 and Python3's Abstract Syntax Tree(AST).
# It provides a compatibility layer between the AST of various Python versions, # It provides a compatibility layer between the AST of various Python versions,
# as produced by ast.parse from the standard ast module. # as produced by ast.parse from the standard ast module.
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from paddle.utils import gast from paddle.utils import gast
from paddle.fluid import unique_name from paddle.fluid import unique_name
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from paddle.utils import gast from paddle.utils import gast
from paddle.fluid.dygraph.dygraph_to_static.static_analysis import AstNodeWrapper from paddle.fluid.dygraph.dygraph_to_static.static_analysis import AstNodeWrapper
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from paddle.utils import gast from paddle.utils import gast
from paddle.fluid.dygraph.dygraph_to_static.static_analysis import AstNodeWrapper from paddle.fluid.dygraph.dygraph_to_static.static_analysis import AstNodeWrapper
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import collections import collections
import copy import copy
import functools import functools
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from paddle.utils import gast from paddle.utils import gast
from paddle.fluid.dygraph.dygraph_to_static.static_analysis import AstNodeWrapper from paddle.fluid.dygraph.dygraph_to_static.static_analysis import AstNodeWrapper
from paddle.fluid.dygraph.dygraph_to_static.utils import FunctionNameLivenessAnalysis from paddle.fluid.dygraph.dygraph_to_static.utils import FunctionNameLivenessAnalysis
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from paddle.utils import gast from paddle.utils import gast
from paddle.fluid.dygraph.dygraph_to_static.static_analysis import AstNodeWrapper from paddle.fluid.dygraph.dygraph_to_static.static_analysis import AstNodeWrapper
from paddle.fluid.dygraph.dygraph_to_static.base_transformer import BaseTransformer from paddle.fluid.dygraph.dygraph_to_static.base_transformer import BaseTransformer
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from paddle.utils import gast from paddle.utils import gast
from paddle.fluid.dygraph.dygraph_to_static.static_analysis import AstNodeWrapper from paddle.fluid.dygraph.dygraph_to_static.static_analysis import AstNodeWrapper
from paddle.fluid.dygraph.dygraph_to_static.base_transformer import BaseTransformer from paddle.fluid.dygraph.dygraph_to_static.base_transformer import BaseTransformer
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from paddle.utils import gast from paddle.utils import gast
import warnings import warnings
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import six import six
import copy import copy
import textwrap import textwrap
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import astor import astor
from paddle.utils import gast from paddle.utils import gast
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
from paddle.utils import gast from paddle.utils import gast
from paddle.fluid.dygraph.dygraph_to_static.utils import ast_to_source_code from paddle.fluid.dygraph.dygraph_to_static.utils import ast_to_source_code
from paddle.fluid.dygraph.dygraph_to_static.base_transformer import BaseTransformer from paddle.fluid.dygraph.dygraph_to_static.base_transformer import BaseTransformer
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import copy import copy
from paddle.utils import gast from paddle.utils import gast
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from __future__ import print_function
import collections import collections
import inspect import inspect
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册