Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
4bf3c8c5
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
694
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4bf3c8c5
编写于
7月 26, 2018
作者:
M
minqiyang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use six.moves to migrate zip, map, reduce and pickle in Python2 to Python3
上级
91f0573b
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
20 addition
and
13 deletion
+20
-13
python/paddle/dataset/cifar.py
python/paddle/dataset/cifar.py
+2
-1
python/paddle/dataset/common.py
python/paddle/dataset/common.py
+1
-2
python/paddle/dataset/conll05.py
python/paddle/dataset/conll05.py
+1
-0
python/paddle/dataset/flowers.py
python/paddle/dataset/flowers.py
+2
-1
python/paddle/dataset/image.py
python/paddle/dataset/image.py
+1
-1
python/paddle/fluid/framework.py
python/paddle/fluid/framework.py
+3
-3
python/paddle/fluid/layer_helper.py
python/paddle/fluid/layer_helper.py
+1
-0
python/paddle/fluid/tests/book/high-level-api/image_classification/cifar10_small_test_set.py
...-level-api/image_classification/cifar10_small_test_set.py
+2
-1
python/paddle/fluid/transpiler/memory_optimization_transpiler.py
...paddle/fluid/transpiler/memory_optimization_transpiler.py
+1
-0
python/paddle/reader/creator.py
python/paddle/reader/creator.py
+1
-1
python/paddle/reader/decorator.py
python/paddle/reader/decorator.py
+2
-0
python/paddle/trainer/PyDataProviderWrapper.py
python/paddle/trainer/PyDataProviderWrapper.py
+1
-1
python/paddle/trainer_config_helpers/data_sources.py
python/paddle/trainer_config_helpers/data_sources.py
+1
-1
python/paddle/trainer_config_helpers/layers.py
python/paddle/trainer_config_helpers/layers.py
+1
-1
未找到文件。
python/paddle/dataset/cifar.py
浏览文件 @
4bf3c8c5
...
...
@@ -28,11 +28,12 @@ images per class.
"""
import
pickle
import
itertools
import
numpy
import
paddle.dataset.common
import
tarfile
from
six.moves
import
zip
from
six.moves
import
cPickle
as
pickle
__all__
=
[
'train100'
,
'test100'
,
'train10'
,
'test10'
,
'convert'
]
...
...
python/paddle/dataset/common.py
浏览文件 @
4bf3c8c5
...
...
@@ -20,9 +20,8 @@ import shutil
import
sys
import
importlib
import
paddle.dataset
import
pickle
import
six.moves.cPickle
as
pickle
import
glob
import
pickle
as
pickle
__all__
=
[
'DATA_HOME'
,
...
...
python/paddle/dataset/conll05.py
浏览文件 @
4bf3c8c5
...
...
@@ -24,6 +24,7 @@ import tarfile
import
gzip
import
itertools
import
paddle.dataset.common
from
six.moves
import
zip
__all__
=
[
'test, get_dict'
,
'get_embedding'
,
'convert'
]
...
...
python/paddle/dataset/flowers.py
浏览文件 @
4bf3c8c5
...
...
@@ -28,7 +28,6 @@ Graphics and Image Processing (2008)
http://www.robots.ox.ac.uk/~vgg/publications/papers/nilsback08.{pdf,ps.gz}.
"""
import
pickle
import
itertools
import
functools
from
.common
import
download
...
...
@@ -39,6 +38,8 @@ from paddle.reader import *
import
os
import
numpy
as
np
from
multiprocessing
import
cpu_count
from
six.moves
import
cPickle
as
pickle
from
six.moves
import
zip
__all__
=
[
'train'
,
'test'
,
'valid'
]
DATA_URL
=
'http://www.robots.ox.ac.uk/~vgg/data/flowers/102/102flowers.tgz'
...
...
python/paddle/dataset/image.py
浏览文件 @
4bf3c8c5
...
...
@@ -36,7 +36,7 @@ except ImportError:
cv2
=
None
import
os
import
tarfile
import
pickle
import
six.moves.cPickle
as
pickle
__all__
=
[
"load_image_bytes"
,
"load_image"
,
"resize_short"
,
"to_chw"
,
"center_crop"
,
...
...
python/paddle/fluid/framework.py
浏览文件 @
4bf3c8c5
...
...
@@ -963,9 +963,9 @@ class Block(object):
raise
ValueError
(
"Var {0} is not found recursively"
.
format
(
name
))
def
all_parameters
(
self
):
return
list
(
self
.
iter_parameters
())
return
list
(
self
.
_
iter_parameters
())
def
iter_parameters
(
self
):
def
_
iter_parameters
(
self
):
return
(
item
[
1
]
for
item
in
list
(
self
.
vars
.
items
())
if
isinstance
(
item
[
1
],
Parameter
))
...
...
@@ -1199,7 +1199,7 @@ class Block(object):
if
not
isinstance
(
other
,
Block
):
raise
TypeError
(
"_copy_param_info_from should be invoked with Block"
)
for
p
in
other
.
iter_parameters
():
for
p
in
other
.
_
iter_parameters
():
assert
isinstance
(
p
,
Parameter
)
v
=
self
.
vars
.
get
(
p
.
name
,
None
)
if
v
is
None
:
...
...
python/paddle/fluid/layer_helper.py
浏览文件 @
4bf3c8c5
...
...
@@ -20,6 +20,7 @@ from . import unique_name
from
paddle.fluid.initializer
import
Constant
,
Xavier
from
.param_attr
import
ParamAttr
,
WeightNormParamAttr
from
.
import
core
from
six.moves
import
zip
class
LayerHelper
(
object
):
...
...
python/paddle/fluid/tests/book/high-level-api/image_classification/cifar10_small_test_set.py
浏览文件 @
4bf3c8c5
...
...
@@ -28,11 +28,12 @@ images per class.
"""
import
pickle
import
itertools
import
numpy
import
paddle.v2.dataset.common
import
tarfile
from
six.moves
import
cPickle
as
pickle
from
six.moves
import
zip
__all__
=
[
'train10'
]
...
...
python/paddle/fluid/transpiler/memory_optimization_transpiler.py
浏览文件 @
4bf3c8c5
...
...
@@ -17,6 +17,7 @@ from .. import core
from
..framework
import
Program
,
default_main_program
,
Parameter
from
..backward
import
_rename_arg_
from
functools
import
reduce
from
six.moves
import
range
dtype_to_size
=
{
core
.
VarDesc
.
VarType
.
FP16
:
2
,
...
...
python/paddle/reader/creator.py
浏览文件 @
4bf3c8c5
...
...
@@ -67,7 +67,7 @@ def recordio(paths, buf_size=100):
import
recordio
as
rec
import
paddle.reader.decorator
as
dec
import
p
ickle
as
pickle
import
six.moves.cP
ickle
as
pickle
def
reader
():
if
isinstance
(
paths
,
str
):
...
...
python/paddle/reader/decorator.py
浏览文件 @
4bf3c8c5
...
...
@@ -22,6 +22,8 @@ import subprocess
from
six.moves.queue
import
Queue
from
six.moves
import
zip_longest
from
six.moves
import
map
from
six.moves
import
zip
import
itertools
import
random
import
zlib
...
...
python/paddle/trainer/PyDataProviderWrapper.py
浏览文件 @
4bf3c8c5
...
...
@@ -42,7 +42,7 @@ except ImportError:
try
:
import
cPickle
as
pickle
except
ImportError
:
import
pickle
import
six.moves.cPickle
as
pickle
import
io
...
...
python/paddle/trainer_config_helpers/data_sources.py
浏览文件 @
4bf3c8c5
...
...
@@ -20,7 +20,7 @@ from .utils import deprecated
try
:
import
cPickle
as
pickle
except
ImportError
:
import
pickle
import
six.moves.cPickle
as
pickle
__all__
=
[
'define_py_data_sources2'
]
...
...
python/paddle/trainer_config_helpers/layers.py
浏览文件 @
4bf3c8c5
...
...
@@ -28,7 +28,7 @@ from .default_decorators import *
try
:
import
cPickle
as
pickle
except
ImportError
:
import
pickle
import
six.moves.cPickle
as
pickle
import
copy
__all__
=
[
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录