Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
a1ba3f44
P
PaddleDetection
项目概览
s920243400
/
PaddleDetection
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleDetection
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a1ba3f44
编写于
11月 12, 2016
作者:
Q
qijun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
format python code in python directory
上级
ef5e483c
变更
54
展开全部
隐藏空白更改
内联
并排
Showing
54 changed file
with
3498 addition
and
2926 deletion
+3498
-2926
python/paddle/__init__.py
python/paddle/__init__.py
+0
-1
python/paddle/trainer/PyDataProvider2.py
python/paddle/trainer/PyDataProvider2.py
+19
-16
python/paddle/trainer/PyDataProviderWrapper.py
python/paddle/trainer/PyDataProviderWrapper.py
+22
-13
python/paddle/trainer/__init__.py
python/paddle/trainer/__init__.py
+0
-1
python/paddle/trainer/config_parser.py
python/paddle/trainer/config_parser.py
+979
-1029
python/paddle/trainer/config_parser_extension.py
python/paddle/trainer/config_parser_extension.py
+5
-5
python/paddle/trainer/recurrent_units.py
python/paddle/trainer/recurrent_units.py
+259
-230
python/paddle/trainer_config_helpers/activations.py
python/paddle/trainer_config_helpers/activations.py
+33
-18
python/paddle/trainer_config_helpers/attrs.py
python/paddle/trainer_config_helpers/attrs.py
+25
-12
python/paddle/trainer_config_helpers/data_sources.py
python/paddle/trainer_config_helpers/data_sources.py
+34
-21
python/paddle/trainer_config_helpers/default_decorators.py
python/paddle/trainer_config_helpers/default_decorators.py
+11
-8
python/paddle/trainer_config_helpers/evaluators.py
python/paddle/trainer_config_helpers/evaluators.py
+118
-123
python/paddle/trainer_config_helpers/layers.py
python/paddle/trainer_config_helpers/layers.py
+864
-569
python/paddle/trainer_config_helpers/math.py
python/paddle/trainer_config_helpers/math.py
+20
-7
python/paddle/trainer_config_helpers/networks.py
python/paddle/trainer_config_helpers/networks.py
+477
-295
python/paddle/trainer_config_helpers/optimizers.py
python/paddle/trainer_config_helpers/optimizers.py
+23
-28
python/paddle/trainer_config_helpers/poolings.py
python/paddle/trainer_config_helpers/poolings.py
+13
-10
python/paddle/trainer_config_helpers/tests/configs/img_layers.py
...paddle/trainer_config_helpers/tests/configs/img_layers.py
+10
-9
python/paddle/trainer_config_helpers/tests/configs/img_trans_layers.py
.../trainer_config_helpers/tests/configs/img_trans_layers.py
+11
-9
python/paddle/trainer_config_helpers/tests/configs/last_first_seq.py
...le/trainer_config_helpers/tests/configs/last_first_seq.py
+4
-13
python/paddle/trainer_config_helpers/tests/configs/layer_activations.py
...trainer_config_helpers/tests/configs/layer_activations.py
+8
-8
python/paddle/trainer_config_helpers/tests/configs/math_ops.py
...n/paddle/trainer_config_helpers/tests/configs/math_ops.py
+2
-6
python/paddle/trainer_config_helpers/tests/configs/projections.py
...addle/trainer_config_helpers/tests/configs/projections.py
+14
-15
python/paddle/trainer_config_helpers/tests/configs/shared_fc.py
.../paddle/trainer_config_helpers/tests/configs/shared_fc.py
+17
-10
python/paddle/trainer_config_helpers/tests/configs/shared_lstm.py
...addle/trainer_config_helpers/tests/configs/shared_lstm.py
+20
-8
python/paddle/trainer_config_helpers/tests/configs/simple_rnn_layers.py
...trainer_config_helpers/tests/configs/simple_rnn_layers.py
+16
-15
python/paddle/trainer_config_helpers/tests/configs/test_bi_grumemory.py
...trainer_config_helpers/tests/configs/test_bi_grumemory.py
+1
-4
python/paddle/trainer_config_helpers/tests/configs/test_bilinear_interp.py
...iner_config_helpers/tests/configs/test_bilinear_interp.py
+17
-20
python/paddle/trainer_config_helpers/tests/configs/test_cost_layers.py
.../trainer_config_helpers/tests/configs/test_cost_layers.py
+31
-18
python/paddle/trainer_config_helpers/tests/configs/test_cost_layers_with_weight.py
...fig_helpers/tests/configs/test_cost_layers_with_weight.py
+6
-6
python/paddle/trainer_config_helpers/tests/configs/test_expand_layer.py
...trainer_config_helpers/tests/configs/test_expand_layer.py
+6
-8
python/paddle/trainer_config_helpers/tests/configs/test_fc.py
...on/paddle/trainer_config_helpers/tests/configs/test_fc.py
+4
-8
python/paddle/trainer_config_helpers/tests/configs/test_grumemory_layer.py
...iner_config_helpers/tests/configs/test_grumemory_layer.py
+8
-6
python/paddle/trainer_config_helpers/tests/configs/test_hsigmoid.py
...dle/trainer_config_helpers/tests/configs/test_hsigmoid.py
+2
-5
python/paddle/trainer_config_helpers/tests/configs/test_lstmemory_layer.py
...iner_config_helpers/tests/configs/test_lstmemory_layer.py
+8
-6
python/paddle/trainer_config_helpers/tests/configs/test_maxout.py
...addle/trainer_config_helpers/tests/configs/test_maxout.py
+28
-40
python/paddle/trainer_config_helpers/tests/configs/test_ntm_layers.py
...e/trainer_config_helpers/tests/configs/test_ntm_layers.py
+21
-14
python/paddle/trainer_config_helpers/tests/configs/test_print_layer.py
.../trainer_config_helpers/tests/configs/test_print_layer.py
+1
-4
python/paddle/trainer_config_helpers/tests/configs/test_rnn_group.py
...le/trainer_config_helpers/tests/configs/test_rnn_group.py
+13
-12
python/paddle/trainer_config_helpers/tests/configs/test_sequence_pooling.py
...ner_config_helpers/tests/configs/test_sequence_pooling.py
+6
-15
python/paddle/trainer_config_helpers/tests/configs/test_split_datasource.py
...ner_config_helpers/tests/configs/test_split_datasource.py
+6
-8
python/paddle/trainer_config_helpers/tests/configs/test_spp_layer.py
...le/trainer_config_helpers/tests/configs/test_spp_layer.py
+7
-9
python/paddle/trainer_config_helpers/tests/configs/unused_layers.py
...dle/trainer_config_helpers/tests/configs/unused_layers.py
+2
-5
python/paddle/trainer_config_helpers/tests/configs/util_layers.py
...addle/trainer_config_helpers/tests/configs/util_layers.py
+3
-5
python/paddle/trainer_config_helpers/tests/layers_test_config.py
...paddle/trainer_config_helpers/tests/layers_test_config.py
+35
-30
python/paddle/trainer_config_helpers/utils.py
python/paddle/trainer_config_helpers/utils.py
+2
-2
python/paddle/utils/image_util.py
python/paddle/utils/image_util.py
+45
-31
python/paddle/utils/make_model_diagram.py
python/paddle/utils/make_model_diagram.py
+8
-9
python/paddle/utils/plotcurve.py
python/paddle/utils/plotcurve.py
+26
-14
python/paddle/utils/predefined_net.py
python/paddle/utils/predefined_net.py
+128
-112
python/paddle/utils/preprocess_img.py
python/paddle/utils/preprocess_img.py
+20
-17
python/paddle/utils/preprocess_util.py
python/paddle/utils/preprocess_util.py
+40
-25
python/paddle/utils/show_pb.py
python/paddle/utils/show_pb.py
+3
-6
python/paddle/utils/torch2paddle.py
python/paddle/utils/torch2paddle.py
+17
-8
未找到文件。
python/paddle/__init__.py
浏览文件 @
a1ba3f44
...
...
@@ -11,4 +11,3 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
python/paddle/trainer/PyDataProvider2.py
浏览文件 @
a1ba3f44
...
...
@@ -18,9 +18,8 @@ import collections
import
functools
import
itertools
logging
.
basicConfig
(
format
=
"[%(levelname)s %(asctime)s %(filename)s:%(lineno)s]"
" %(message)s"
)
logging
.
basicConfig
(
format
=
"[%(levelname)s %(asctime)s %(filename)s:%(lineno)s]"
" %(message)s"
)
class
SequenceType
(
object
):
...
...
@@ -132,8 +131,10 @@ class InputOrderWrapper(object):
def
__call__
(
self
,
obj
,
filename
):
for
item
in
self
.
generator
(
obj
,
filename
):
if
isinstance
(
item
,
dict
):
yield
[
item
.
get
(
input_name
,
None
)
for
input_name
in
self
.
input_order
]
yield
[
item
.
get
(
input_name
,
None
)
for
input_name
in
self
.
input_order
]
else
:
yield
item
...
...
@@ -162,8 +163,8 @@ class CheckWrapper(object):
yield
items
except
AssertionError
as
e
:
self
.
logger
.
warning
(
"Item (%s) is not fit the input type with error %s"
%
(
repr
(
item
),
repr
(
e
)))
"Item (%s) is not fit the input type with error %s"
%
(
repr
(
item
),
repr
(
e
)))
if
self
.
check_fail_continue
:
continue
...
...
@@ -202,13 +203,17 @@ class CheckWrapper(object):
callback
(
each
)
def
provider
(
input_types
=
None
,
should_shuffle
=
None
,
pool_size
=-
1
,
def
provider
(
input_types
=
None
,
should_shuffle
=
None
,
pool_size
=-
1
,
min_pool_size
=-
1
,
can_over_batch_size
=
True
,
calc_batch_size
=
None
,
cache
=
CacheType
.
NO_CACHE
,
check
=
False
,
check_fail_continue
=
False
,
init_hook
=
None
,
**
kwargs
):
check
=
False
,
check_fail_continue
=
False
,
init_hook
=
None
,
**
kwargs
):
"""
Provider decorator. Use it to make a function into PyDataProvider2 object.
In this function, user only need to get each sample for some train/test
...
...
@@ -318,9 +323,9 @@ def provider(input_types=None, should_shuffle=None, pool_size=-1,
"Could not recognize should_shuffle (%s), "
"just use default value of should_shuffle."
" Please set should_shuffle to bool value or "
"something in %s"
%
(
repr
(
self
.
should_shuffle
),
repr
(
true_table
+
false_table
)))
"something in %s"
%
(
repr
(
self
.
should_shuffle
),
repr
(
true_table
+
false_table
)))
self
.
should_shuffle
=
None
self
.
pool_size
=
pool_size
...
...
@@ -351,8 +356,7 @@ def provider(input_types=None, should_shuffle=None, pool_size=-1,
self
.
generator
=
InputOrderWrapper
(
self
.
generator
,
self
.
input_order
)
if
self
.
check
:
self
.
generator
=
CheckWrapper
(
self
.
generator
,
self
.
slots
,
self
.
generator
=
CheckWrapper
(
self
.
generator
,
self
.
slots
,
check_fail_continue
,
self
.
logger
)
...
...
@@ -368,4 +372,3 @@ def deserialize_args(args):
:return:
"""
return
cPickle
.
loads
(
args
)
python/paddle/trainer/PyDataProviderWrapper.py
浏览文件 @
a1ba3f44
...
...
@@ -11,7 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
This module provide a wrapper(decorator) to wrap a data process method into a
PyDataProvider. Some examples are shown `here <data_provider/python_case.html>`_.
...
...
@@ -47,6 +46,7 @@ except ImportError:
import
io
class
SlotType
(
object
):
# Just a hint for user.
pass
...
...
@@ -83,6 +83,7 @@ class SparseNonValueSlot(SlotType):
- **SubSeq**: [[[int, int, ...], [int, ....], ...] ,
\
[[int, int, ...], [int, ....], ...] , ...]
"""
def
__init__
(
self
,
dim
):
"""
:param dim: slot dimension
...
...
@@ -294,8 +295,9 @@ class GeneralPyDataProvider:
fn
=
"%s_%d"
%
(
self
.
profile_filename
,
self
.
profile_count
)
sortby
=
"cumulative"
with
open
(
fn
,
"w"
)
as
f
:
pstats
.
Stats
(
self
.
profiler
,
stream
=
f
).
sort_stats
(
sortby
).
print_stats
()
pstats
.
Stats
(
self
.
profiler
,
stream
=
f
).
sort_stats
(
sortby
).
print_stats
()
self
.
logger
.
info
(
"saving profile to file %s"
%
fn
)
self
.
profile_count
+=
1
self
.
logger
.
info
(
"resetting profile"
)
...
...
@@ -453,9 +455,10 @@ class GeneralPyDataProvider:
seq_stream
.
flush
()
subseq_stream
.
flush
()
return
""
.
join
([
self
.
int_packer
.
pack
(
current_batch_size
),
data_bytes
.
getvalue
(),
seq_bytes
.
getvalue
(),
subseq_bytes
.
getvalue
()])
return
""
.
join
([
self
.
int_packer
.
pack
(
current_batch_size
),
data_bytes
.
getvalue
(),
seq_bytes
.
getvalue
(),
subseq_bytes
.
getvalue
()
])
finally
:
data_stream
.
close
()
...
...
@@ -516,7 +519,7 @@ class GeneralPyDataProvider:
self
.
data_pool
[
idx
])
idx
-=
1
ret_list
+=
self
.
data_pool
[
self
.
data_pool_idx
:
idx
+
1
]
ret_list
+=
self
.
data_pool
[
self
.
data_pool_idx
:
idx
+
1
]
# for speed reason, just shift left index, not delete data actually.
self
.
data_pool_idx
=
idx
+
1
...
...
@@ -537,8 +540,8 @@ class GeneralPyDataProvider:
if
self
.
max_pool_size
==
0
:
for
i
in
xrange
(
min
(
self
.
file_count
,
len
(
self
.
generators
))):
self
.
data_pool
+=
list
(
self
.
generators
[
i
])
self
.
generators
=
self
.
generators
[
min
(
self
.
file_count
,
len
(
self
.
generators
)):]
self
.
generators
=
self
.
generators
[
min
(
self
.
file_count
,
len
(
self
.
generators
)):]
self
.
max_pool_size
=
len
(
self
.
data_pool
)
else
:
while
len
(
self
.
data_pool
)
<
self
.
max_pool_size
and
len
(
...
...
@@ -562,9 +565,15 @@ def default_init_hook(cls, *args, **kwargs):
del
cls
,
args
,
kwargs
def
provider
(
slots
=
None
,
use_seq
=
False
,
should_shuffle
=
True
,
pool_size
=
1
,
can_over_batch_size
=
True
,
calc_batch_size
=
lambda
data
:
1
,
debug
=
False
,
init_hook
=
default_init_hook
,
profile_filename
=
None
):
def
provider
(
slots
=
None
,
use_seq
=
False
,
should_shuffle
=
True
,
pool_size
=
1
,
can_over_batch_size
=
True
,
calc_batch_size
=
lambda
data
:
1
,
debug
=
False
,
init_hook
=
default_init_hook
,
profile_filename
=
None
):
"""
The decorator for PyDataProvider. User should use this to create Provider class.
User should only concern how to read sample from file.
...
...
@@ -663,7 +672,7 @@ def provider(slots=None, use_seq=False, should_shuffle=True, pool_size=1,
def
__init__
(
self
,
*
file_list
,
**
kwargs
):
logging
.
basicConfig
(
format
=
"[%(levelname)s %(asctime)s %(filename)s:%(lineno)s]"
" %(message)s"
)
" %(message)s"
)
self
.
logger
=
logging
.
getLogger
(
""
)
if
debug
:
...
...
python/paddle/trainer/__init__.py
浏览文件 @
a1ba3f44
...
...
@@ -11,4 +11,3 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
python/paddle/trainer/config_parser.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer/config_parser_extension.py
浏览文件 @
a1ba3f44
...
...
@@ -17,11 +17,10 @@ from paddle.proto.DataConfig_pb2 import DataConfig
g_config
=
None
def
SimpleData
(
files
=
None
,
feat_dim
=
None
,
context_len
=
None
,
buffer_capacity
=
None
):
def
SimpleData
(
files
=
None
,
feat_dim
=
None
,
context_len
=
None
,
buffer_capacity
=
None
):
data_config
=
DataConfig
()
data_config
.
type
=
'simple'
...
...
@@ -33,6 +32,7 @@ def SimpleData(
data_config
.
buffer_capacity
=
buffer_capacity
return
data_config
def
get_config_funcs
(
trainer_config
):
global
g_config
g_config
=
trainer_config
...
...
python/paddle/trainer/recurrent_units.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/activations.py
浏览文件 @
a1ba3f44
...
...
@@ -12,13 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
__all__
=
[
"TanhActivation"
,
"SigmoidActivation"
,
"SoftmaxActivation"
,
"IdentityActivation"
,
"LinearActivation"
,
'SequenceSoftmaxActivation'
,
'ExpActivation'
,
"ReluActivation"
,
"BReluActivation"
,
"SoftReluActivation"
,
"STanhActivation"
,
"AbsActivation"
,
"SquareActivation"
,
"BaseActivation"
]
__all__
=
[
"TanhActivation"
,
"SigmoidActivation"
,
"SoftmaxActivation"
,
"IdentityActivation"
,
"LinearActivation"
,
'SequenceSoftmaxActivation'
,
'ExpActivation'
,
"ReluActivation"
,
"BReluActivation"
,
"SoftReluActivation"
,
"STanhActivation"
,
"AbsActivation"
,
"SquareActivation"
,
"BaseActivation"
]
class
BaseActivation
(
object
):
...
...
@@ -51,7 +50,8 @@ class TanhActivation(BaseActivation):
f(z)=tanh(z)=
\\
frac{e^z-e^{-z}}{e^z+e^{-z}}
"""
def
__init__
(
self
):
BaseActivation
.
__init__
(
self
,
'tanh'
,
True
)
def
__init__
(
self
):
BaseActivation
.
__init__
(
self
,
'tanh'
,
True
)
class
SigmoidActivation
(
BaseActivation
):
...
...
@@ -63,7 +63,8 @@ class SigmoidActivation(BaseActivation):
f(z) =
\\
frac{1}{1+exp(-z)}
"""
def
__init__
(
self
):
BaseActivation
.
__init__
(
self
,
'sigmoid'
,
True
)
def
__init__
(
self
):
BaseActivation
.
__init__
(
self
,
'sigmoid'
,
True
)
class
SoftmaxActivation
(
BaseActivation
):
...
...
@@ -104,7 +105,8 @@ class IdentityActivation(BaseActivation):
Just do nothing for output both forward/backward.
"""
def
__init__
(
self
):
BaseActivation
.
__init__
(
self
,
''
,
False
)
def
__init__
(
self
):
BaseActivation
.
__init__
(
self
,
''
,
False
)
LinearActivation
=
IdentityActivation
...
...
@@ -124,7 +126,8 @@ class ReluActivation(BaseActivation):
0 &
\\
quad
\\
mathrm{otherwize}
"""
def
__init__
(
self
):
BaseActivation
.
__init__
(
self
,
'relu'
,
True
)
def
__init__
(
self
):
BaseActivation
.
__init__
(
self
,
'relu'
,
True
)
class
BReluActivation
(
BaseActivation
):
...
...
@@ -141,7 +144,8 @@ class BReluActivation(BaseActivation):
0 &
\\
quad
\\
mathrm{otherwise}
"""
def
__init__
(
self
):
BaseActivation
.
__init__
(
self
,
'brelu'
,
False
)
def
__init__
(
self
):
BaseActivation
.
__init__
(
self
,
'brelu'
,
False
)
class
SoftReluActivation
(
BaseActivation
):
...
...
@@ -149,7 +153,9 @@ class SoftReluActivation(BaseActivation):
SoftRelu Activation.
"""
def
__init__
(
self
):
BaseActivation
.
__init__
(
self
,
'softrelu'
,
False
)
def
__init__
(
self
):
BaseActivation
.
__init__
(
self
,
'softrelu'
,
False
)
class
STanhActivation
(
BaseActivation
):
"""
...
...
@@ -160,7 +166,8 @@ class STanhActivation(BaseActivation):
f(z) = 1.7159 * tanh(2/3*z)
"""
def
__init__
(
self
):
BaseActivation
.
__init__
(
self
,
'stanh'
,
False
)
def
__init__
(
self
):
BaseActivation
.
__init__
(
self
,
'stanh'
,
False
)
class
AbsActivation
(
BaseActivation
):
...
...
@@ -178,7 +185,8 @@ class AbsActivation(BaseActivation):
0 &
\\
quad if
\\
quad z = 0
"""
def
__init__
(
self
):
BaseActivation
.
__init__
(
self
,
'abs'
,
False
)
def
__init__
(
self
):
BaseActivation
.
__init__
(
self
,
'abs'
,
False
)
class
SquareActivation
(
BaseActivation
):
...
...
@@ -189,7 +197,9 @@ class SquareActivation(BaseActivation):
f(z) = z^2.
"""
def
__init__
(
self
):
BaseActivation
.
__init__
(
self
,
'square'
,
False
)
def
__init__
(
self
):
BaseActivation
.
__init__
(
self
,
'square'
,
False
)
class
ExpActivation
(
BaseActivation
):
"""
...
...
@@ -198,7 +208,10 @@ class ExpActivation(BaseActivation):
.. math::
f(z) = e^z.
"""
def
__init__
(
self
):
BaseActivation
.
__init__
(
self
,
'exponential'
,
False
)
def
__init__
(
self
):
BaseActivation
.
__init__
(
self
,
'exponential'
,
False
)
class
LogActivation
(
BaseActivation
):
"""
...
...
@@ -207,4 +220,6 @@ class LogActivation(BaseActivation):
.. math::
f(z) = log(z)
"""
def
__init__
(
self
):
BaseActivation
.
__init__
(
self
,
'log'
,
False
)
def
__init__
(
self
):
BaseActivation
.
__init__
(
self
,
'log'
,
False
)
python/paddle/trainer_config_helpers/attrs.py
浏览文件 @
a1ba3f44
...
...
@@ -13,8 +13,9 @@
# limitations under the License.
from
paddle.trainer.config_parser
import
*
__all__
=
[
'ParamAttr'
,
'ExtraAttr'
,
'ParameterAttribute'
,
'ExtraLayerAttribute'
]
__all__
=
[
'ParamAttr'
,
'ExtraAttr'
,
'ParameterAttribute'
,
'ExtraLayerAttribute'
]
def
convert_and_compare
(
x
,
Type
):
...
...
@@ -25,7 +26,8 @@ def convert_and_compare(x, Type):
:param Type: target type to check x over
"""
return
type
(
x
)(
Type
(
x
))
==
x
return
type
(
x
)(
Type
(
x
))
==
x
def
is_compatible_with
(
x
,
Type
):
"""
...
...
@@ -38,9 +40,9 @@ def is_compatible_with(x, Type):
return
True
try
:
if
float
==
Type
or
int
==
Type
:
# avoid those types that can be converted to float/int but not very
# meaningful and could potentially lead to error
# i.e., str and bool typed value should not be used for initializing float/int variable
# avoid those types that can be converted to float/int but not very
# meaningful and could potentially lead to error
# i.e., str and bool typed value should not be used for initializing float/int variable
if
not
isinstance
(
x
,
str
)
and
not
isinstance
(
x
,
bool
):
return
convert_and_compare
(
x
,
Type
)
elif
bool
==
Type
:
...
...
@@ -91,9 +93,17 @@ class ParameterAttribute(object):
:type sparse_update: bool
"""
def
__init__
(
self
,
name
=
None
,
is_static
=
False
,
initial_std
=
None
,
initial_mean
=
None
,
initial_max
=
None
,
initial_min
=
None
,
l1_rate
=
None
,
l2_rate
=
None
,
learning_rate
=
None
,
momentum
=
None
,
def
__init__
(
self
,
name
=
None
,
is_static
=
False
,
initial_std
=
None
,
initial_mean
=
None
,
initial_max
=
None
,
initial_min
=
None
,
l1_rate
=
None
,
l2_rate
=
None
,
learning_rate
=
None
,
momentum
=
None
,
sparse_update
=
False
):
# initialize strategy.
if
is_static
:
...
...
@@ -183,7 +193,10 @@ class ExtraLayerAttribute(object):
:type device: int
"""
def
__init__
(
self
,
error_clipping_threshold
=
None
,
drop_rate
=
None
,
device
=
None
):
def
__init__
(
self
,
error_clipping_threshold
=
None
,
drop_rate
=
None
,
device
=
None
):
self
.
attr
=
dict
()
if
isinstance
(
error_clipping_threshold
,
float
):
assert
error_clipping_threshold
>
0
...
...
@@ -200,8 +213,8 @@ class ExtraLayerAttribute(object):
for
key
in
self
.
attr
:
if
not
hasattr
(
self
,
'can_%s'
%
key
)
or
\
not
getattr
(
self
,
'can_%s'
%
key
):
raise
NotImplementedError
(
"Layer %s cannot support %s"
%
(
layer_name
,
key
))
raise
NotImplementedError
(
"Layer %s cannot support %s"
%
(
layer_name
,
key
))
@
staticmethod
def
to_kwargs
(
attr
):
...
...
python/paddle/trainer_config_helpers/data_sources.py
浏览文件 @
a1ba3f44
...
...
@@ -11,7 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Data Sources are helpers to define paddle training data or testing data.
"""
...
...
@@ -26,8 +25,12 @@ except ImportError:
__all__
=
[
'define_py_data_sources2'
]
def
define_py_data_source
(
file_list
,
cls
,
module
,
obj
,
args
=
None
,
async
=
False
,
def
define_py_data_source
(
file_list
,
cls
,
module
,
obj
,
args
=
None
,
async
=
False
,
data_cls
=
PyData
):
"""
Define a python data source.
...
...
@@ -76,8 +79,9 @@ def define_py_data_source(file_list, cls, module,
args
=
pickle
.
dumps
(
args
,
0
)
if
data_cls
is
None
:
def
py_data2
(
files
,
load_data_module
,
load_data_object
,
load_data_args
,
**
kwargs
):
**
kwargs
):
data
=
DataBase
()
data
.
type
=
'py2'
data
.
files
=
files
...
...
@@ -86,17 +90,25 @@ def define_py_data_source(file_list, cls, module,
data
.
load_data_args
=
load_data_args
data
.
async_load_data
=
True
return
data
data_cls
=
py_data2
cls
(
data_cls
(
files
=
file_list
,
load_data_module
=
module
,
load_data_object
=
obj
,
load_data_args
=
args
,
async_load_data
=
async
))
data_cls
=
py_data2
def
define_py_data_sources
(
train_list
,
test_list
,
module
,
obj
,
args
=
None
,
train_async
=
False
,
data_cls
=
PyData
):
cls
(
data_cls
(
files
=
file_list
,
load_data_module
=
module
,
load_data_object
=
obj
,
load_data_args
=
args
,
async_load_data
=
async
))
def
define_py_data_sources
(
train_list
,
test_list
,
module
,
obj
,
args
=
None
,
train_async
=
False
,
data_cls
=
PyData
):
"""
The annotation is almost the same as define_py_data_sources2, except that
it can specific train_async and data_cls.
...
...
@@ -125,8 +137,8 @@ def define_py_data_sources(train_list, test_list, module, obj, args=None,
"""
def
__is_splitable__
(
o
):
return
(
isinstance
(
o
,
list
)
or
isinstance
(
o
,
tuple
)
)
and
hasattr
(
o
,
'__len__'
)
and
len
(
o
)
==
2
return
(
isinstance
(
o
,
list
)
or
isinstance
(
o
,
tuple
)
)
and
hasattr
(
o
,
'__len__'
)
and
len
(
o
)
==
2
assert
train_list
is
not
None
or
test_list
is
not
None
assert
module
is
not
None
and
obj
is
not
None
...
...
@@ -196,9 +208,10 @@ def define_py_data_sources2(train_list, test_list, module, obj, args=None):
:return: None
:rtype: None
"""
define_py_data_sources
(
train_list
=
train_list
,
test_list
=
test_list
,
module
=
module
,
obj
=
obj
,
args
=
args
,
data_cls
=
None
)
define_py_data_sources
(
train_list
=
train_list
,
test_list
=
test_list
,
module
=
module
,
obj
=
obj
,
args
=
args
,
data_cls
=
None
)
python/paddle/trainer_config_helpers/default_decorators.py
浏览文件 @
a1ba3f44
...
...
@@ -18,16 +18,18 @@ from .attrs import ParamAttr
from
.activations
import
TanhActivation
from
paddle.trainer.config_parser
import
*
__all__
=
[
'wrap_name_default'
,
'wrap_param_attr_default'
,
'wrap_bias_attr_default'
,
'wrap_act_default'
,
'wrap_param_default'
]
__all__
=
[
'wrap_name_default'
,
'wrap_param_attr_default'
,
'wrap_bias_attr_default'
,
'wrap_act_default'
,
'wrap_param_default'
]
def
__default_not_set_callback__
(
kwargs
,
name
):
return
name
not
in
kwargs
or
kwargs
[
name
]
is
None
def
wrap_param_default
(
param_names
=
None
,
default_factory
=
None
,
def
wrap_param_default
(
param_names
=
None
,
default_factory
=
None
,
not_set_callback
=
__default_not_set_callback__
):
assert
param_names
is
not
None
assert
isinstance
(
param_names
,
list
)
or
isinstance
(
param_names
,
tuple
)
...
...
@@ -43,7 +45,8 @@ def wrap_param_default(param_names=None, default_factory=None,
if
argspec
.
defaults
:
num_positional
-=
len
(
argspec
.
defaults
)
if
not
argspec
.
varargs
and
len
(
args
)
>
num_positional
:
logger
.
fatal
(
"Must use keyword arguments for non-positional args"
)
logger
.
fatal
(
"Must use keyword arguments for non-positional args"
)
for
name
in
param_names
:
if
not_set_callback
(
kwargs
,
name
):
# Not set
kwargs
[
name
]
=
default_factory
(
func
)
...
...
@@ -112,13 +115,13 @@ def wrap_param_attr_default(param_names=None, default_factory=None):
return
wrap_param_default
(
param_names
,
default_factory
)
def
wrap_bias_attr_default
(
param_names
=
None
,
default_factory
=
None
,
def
wrap_bias_attr_default
(
param_names
=
None
,
default_factory
=
None
,
has_bias
=
True
):
if
param_names
is
None
:
param_names
=
[
'bias_attr'
]
if
default_factory
is
None
:
default_factory
=
lambda
_
:
ParamAttr
(
initial_std
=
0.
,
initial_mean
=
0.
)
default_factory
=
lambda
_
:
ParamAttr
(
initial_std
=
0.
,
initial_mean
=
0.
)
def
__bias_attr_not_set__
(
kwargs
,
name
):
if
has_bias
:
...
...
python/paddle/trainer_config_helpers/evaluators.py
浏览文件 @
a1ba3f44
...
...
@@ -15,13 +15,14 @@
from
paddle.trainer.config_parser
import
*
from
default_decorators
import
*
__all__
=
[
"evaluator_base"
,
"classification_error_evaluator"
,
"auc_evaluator"
,
"pnpair_evaluator"
,
"precision_recall_evaluator"
,
"ctc_error_evaluator"
,
"chunk_evaluator"
,
"sum_evaluator"
,
"column_sum_evaluator"
,
"value_printer_evaluator"
,
"gradient_printer_evaluator"
,
"maxid_printer_evaluator"
,
"maxframe_printer_evaluator"
,
"seqtext_printer_evaluator"
,
"classification_error_printer_evaluator"
]
__all__
=
[
"evaluator_base"
,
"classification_error_evaluator"
,
"auc_evaluator"
,
"pnpair_evaluator"
,
"precision_recall_evaluator"
,
"ctc_error_evaluator"
,
"chunk_evaluator"
,
"sum_evaluator"
,
"column_sum_evaluator"
,
"value_printer_evaluator"
,
"gradient_printer_evaluator"
,
"maxid_printer_evaluator"
,
"maxframe_printer_evaluator"
,
"seqtext_printer_evaluator"
,
"classification_error_printer_evaluator"
]
class
EvaluatorAttribute
(
object
):
...
...
@@ -32,10 +33,7 @@ class EvaluatorAttribute(object):
FOR_UTILS
=
1
<<
4
KEYS
=
[
"for_classification"
,
"for_regression"
,
"for_rank"
,
"for_print"
,
"for_classification"
,
"for_regression"
,
"for_rank"
,
"for_print"
,
"for_utils"
]
...
...
@@ -55,22 +53,23 @@ def evaluator(*attrs):
setattr
(
method
,
EvaluatorAttribute
.
to_key
(
attr
),
True
)
method
.
is_evaluator
=
True
return
method
return
impl
def
evaluator_base
(
input
,
type
,
label
=
None
,
weight
=
None
,
name
=
None
,
chunk_scheme
=
None
,
num_chunk_types
=
None
,
classification_threshold
=
None
,
positive_label
=
None
,
dict_file
=
None
,
result_file
=
None
,
num_results
=
None
,
delimited
=
None
):
def
evaluator_base
(
input
,
type
,
label
=
None
,
weight
=
None
,
name
=
None
,
chunk_scheme
=
None
,
num_chunk_types
=
None
,
classification_threshold
=
None
,
positive_label
=
None
,
dict_file
=
None
,
result_file
=
None
,
num_results
=
None
,
delimited
=
None
):
"""
Evaluator will evaluate the network status while training/testing.
...
...
@@ -130,14 +129,14 @@ def evaluator_base(
result_file
=
result_file
,
delimited
=
delimited
)
@
evaluator
(
EvaluatorAttribute
.
FOR_CLASSIFICATION
)
@
wrap_name_default
()
def
classification_error_evaluator
(
input
,
label
,
name
=
None
,
weight
=
None
,
threshold
=
None
):
def
classification_error_evaluator
(
input
,
label
,
name
=
None
,
weight
=
None
,
threshold
=
None
):
"""
Classification Error Evaluator. It will print error rate for classification.
...
...
@@ -170,13 +169,14 @@ def classification_error_evaluator(
:return: None.
"""
evaluator_base
(
name
=
name
,
type
=
"classification_error"
,
input
=
input
,
label
=
label
,
weight
=
weight
,
classification_threshold
=
threshold
,
)
evaluator_base
(
name
=
name
,
type
=
"classification_error"
,
input
=
input
,
label
=
label
,
weight
=
weight
,
classification_threshold
=
threshold
,
)
@
evaluator
(
EvaluatorAttribute
.
FOR_CLASSIFICATION
)
@
wrap_name_default
()
...
...
@@ -184,8 +184,7 @@ def auc_evaluator(
input
,
label
,
name
=
None
,
weight
=
None
,
):
weight
=
None
,
):
"""
Auc Evaluator which adapts to binary classification.
...
...
@@ -205,11 +204,13 @@ def auc_evaluator(
[sample_num, 1].
:type weight: LayerOutput
"""
evaluator_base
(
name
=
name
,
type
=
"last-column-auc"
,
input
=
input
,
label
=
label
,
weight
=
weight
)
evaluator_base
(
name
=
name
,
type
=
"last-column-auc"
,
input
=
input
,
label
=
label
,
weight
=
weight
)
@
evaluator
(
EvaluatorAttribute
.
FOR_RANK
)
@
wrap_name_default
()
...
...
@@ -218,8 +219,7 @@ def pnpair_evaluator(
label
,
info
,
name
=
None
,
weight
=
None
,
):
weight
=
None
,
):
"""
Positive-negative pair rate Evaluator which adapts to rank task like
learning to rank. This evaluator must contain at least three layers.
...
...
@@ -242,12 +242,14 @@ def pnpair_evaluator(
[sample_num, 1]. (TODO, explaination)
:type weight: LayerOutput
"""
evaluator_base
(
name
=
name
,
type
=
"pnpair"
,
input
=
input
,
label
=
label
,
info
=
info
,
weight
=
weight
)
evaluator_base
(
name
=
name
,
type
=
"pnpair"
,
input
=
input
,
label
=
label
,
info
=
info
,
weight
=
weight
)
@
evaluator
(
EvaluatorAttribute
.
FOR_CLASSIFICATION
)
@
wrap_name_default
()
...
...
@@ -256,8 +258,7 @@ def precision_recall_evaluator(
label
,
positive_label
=
None
,
weight
=
None
,
name
=
None
,
):
name
=
None
,
):
"""
An Evaluator to calculate precision and recall, F1-score.
It is adapt to the task with multiple labels.
...
...
@@ -286,20 +287,21 @@ def precision_recall_evaluator(
[sample_num, 1]. (TODO, explaination)
:type weight: LayerOutput
"""
evaluator_base
(
name
=
name
,
type
=
"precision_recall"
,
input
=
input
,
label
=
label
,
positive_label
=
positive_label
,
weight
=
weight
)
evaluator_base
(
name
=
name
,
type
=
"precision_recall"
,
input
=
input
,
label
=
label
,
positive_label
=
positive_label
,
weight
=
weight
)
@
evaluator
(
EvaluatorAttribute
.
FOR_CLASSIFICATION
)
@
wrap_name_default
()
def
ctc_error_evaluator
(
input
,
label
,
name
=
None
,
):
name
=
None
,
):
"""
This evaluator is to calculate sequence-to-sequence edit distance.
...
...
@@ -317,10 +319,9 @@ def ctc_error_evaluator(
label for ctc_layer
:type label: LayerOutput
"""
evaluator_base
(
name
=
name
,
type
=
"ctc_edit_distance"
,
input
=
input
,
label
=
label
)
evaluator_base
(
name
=
name
,
type
=
"ctc_edit_distance"
,
input
=
input
,
label
=
label
)
@
evaluator
(
EvaluatorAttribute
.
FOR_CLASSIFICATION
)
@
wrap_name_default
()
...
...
@@ -328,8 +329,7 @@ def chunk_evaluator(
input
,
name
=
None
,
chunk_scheme
=
None
,
num_chunk_types
=
None
,
):
num_chunk_types
=
None
,
):
"""
Chunk evaluator is used to evaluate segment labelling accuracy for a
sequence. It calculates the chunk detection F1 score.
...
...
@@ -375,19 +375,20 @@ def chunk_evaluator(
:type chunk_scheme: basestring
:param num_chunk_types: number of chunk types other than "other"
"""
evaluator_base
(
name
=
name
,
type
=
"chunk"
,
input
=
input
,
chunk_scheme
=
chunk_scheme
,
num_chunk_types
=
num_chunk_types
)
evaluator_base
(
name
=
name
,
type
=
"chunk"
,
input
=
input
,
chunk_scheme
=
chunk_scheme
,
num_chunk_types
=
num_chunk_types
)
@
evaluator
(
EvaluatorAttribute
.
FOR_UTILS
)
@
wrap_name_default
()
def
sum_evaluator
(
input
,
name
=
None
,
weight
=
None
,
):
weight
=
None
,
):
"""
An Evaluator to sum the result of input.
...
...
@@ -405,18 +406,15 @@ def sum_evaluator(
[sample_num, 1]. (TODO, explaination)
:type weight: LayerOutput
"""
evaluator_base
(
name
=
name
,
type
=
"sum"
,
input
=
input
,
weight
=
weight
)
evaluator_base
(
name
=
name
,
type
=
"sum"
,
input
=
input
,
weight
=
weight
)
@
evaluator
(
EvaluatorAttribute
.
FOR_UTILS
)
@
wrap_name_default
()
def
column_sum_evaluator
(
input
,
name
=
None
,
weight
=
None
,
):
weight
=
None
,
):
"""
This Evaluator is used to sum the last column of input.
...
...
@@ -431,22 +429,22 @@ def column_sum_evaluator(
:param input: Input Layer name.
:type input: LayerOutput
"""
evaluator_base
(
name
=
name
,
type
=
"last-column-sum"
,
input
=
input
,
weight
=
weight
)
evaluator_base
(
name
=
name
,
type
=
"last-column-sum"
,
input
=
input
,
weight
=
weight
)
"""
The following are printer Evaluators which are usually used to
print the result, like value or gradient of input layers, the
results generated in machine translation, the classification error etc.
"""
@
evaluator
(
EvaluatorAttribute
.
FOR_PRINT
)
@
wrap_name_default
()
def
value_printer_evaluator
(
input
,
name
=
None
,
):
name
=
None
,
):
"""
This Evaluator is used to print the values of input layers. It contains
one or more input layers.
...
...
@@ -462,16 +460,14 @@ def value_printer_evaluator(
:param name: Evaluator name.
:type name: None|basestring
"""
evaluator_base
(
name
=
name
,
type
=
"value_printer"
,
input
=
input
)
evaluator_base
(
name
=
name
,
type
=
"value_printer"
,
input
=
input
)
@
evaluator
(
EvaluatorAttribute
.
FOR_PRINT
)
@
wrap_name_default
()
def
gradient_printer_evaluator
(
input
,
name
=
None
,
):
name
=
None
,
):
"""
This Evaluator is used to print the gradient of input layers. It contains
one or more input layers.
...
...
@@ -487,17 +483,15 @@ def gradient_printer_evaluator(
:param name: Evaluator name.
:type name: None|basestring
"""
evaluator_base
(
name
=
name
,
type
=
"gradient_printer"
,
input
=
input
)
evaluator_base
(
name
=
name
,
type
=
"gradient_printer"
,
input
=
input
)
@
evaluator
(
EvaluatorAttribute
.
FOR_PRINT
)
@
wrap_name_default
()
def
maxid_printer_evaluator
(
input
,
num_results
=
None
,
name
=
None
,
):
name
=
None
,
):
"""
This Evaluator is used to print maximum top k values and their indexes
of each row of input layers. It contains one or more input layers.
...
...
@@ -517,18 +511,16 @@ def maxid_printer_evaluator(
:param name: Evaluator name.
:type name: None|basestring
"""
evaluator_base
(
name
=
name
,
type
=
"max_id_printer"
,
input
=
input
,
num_results
=
num_results
)
evaluator_base
(
name
=
name
,
type
=
"max_id_printer"
,
input
=
input
,
num_results
=
num_results
)
@
evaluator
(
EvaluatorAttribute
.
FOR_PRINT
)
@
wrap_name_default
()
def
maxframe_printer_evaluator
(
input
,
num_results
=
None
,
name
=
None
,
):
name
=
None
,
):
"""
This Evaluator is used to print the top k frames of each input layers.
The input layers should contain sequences info or sequences type.
...
...
@@ -549,10 +541,12 @@ def maxframe_printer_evaluator(
:param name: Evaluator name.
:type name: None|basestring
"""
evaluator_base
(
name
=
name
,
type
=
"max_frame_printer"
,
input
=
input
,
num_results
=
num_results
)
evaluator_base
(
name
=
name
,
type
=
"max_frame_printer"
,
input
=
input
,
num_results
=
num_results
)
@
evaluator
(
EvaluatorAttribute
.
FOR_PRINT
)
@
wrap_name_default
()
...
...
@@ -562,8 +556,7 @@ def seqtext_printer_evaluator(
id_input
=
None
,
dict_file
=
None
,
delimited
=
None
,
name
=
None
,
):
name
=
None
,
):
"""
Sequence text printer will print text according to index matrix and a
dictionary. There can be multiple input to this layer:
...
...
@@ -636,12 +629,14 @@ def seqtext_printer_evaluator(
inputs
=
[
id_input
,
input
]
input
.
parents
.
append
(
id_input
)
evaluator_base
(
name
=
name
,
type
=
"seq_text_printer"
,
input
=
inputs
,
dict_file
=
dict_file
,
result_file
=
result_file
,
delimited
=
delimited
)
evaluator_base
(
name
=
name
,
type
=
"seq_text_printer"
,
input
=
inputs
,
dict_file
=
dict_file
,
result_file
=
result_file
,
delimited
=
delimited
)
@
evaluator
(
EvaluatorAttribute
.
FOR_PRINT
)
@
wrap_name_default
()
...
...
@@ -649,8 +644,7 @@ def classification_error_printer_evaluator(
input
,
label
,
threshold
=
0.5
,
name
=
None
,
):
name
=
None
,
):
"""
This Evaluator is used to print the classification error of each sample.
...
...
@@ -667,8 +661,9 @@ def classification_error_printer_evaluator(
:param name: Evaluator name.
:type name: None|basestring
"""
evaluator_base
(
name
=
name
,
type
=
"classification_error_printer"
,
input
=
input
,
label
=
label
,
classification_threshold
=
threshold
)
evaluator_base
(
name
=
name
,
type
=
"classification_error_printer"
,
input
=
input
,
label
=
label
,
classification_threshold
=
threshold
)
python/paddle/trainer_config_helpers/layers.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/math.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/networks.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/optimizers.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/poolings.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/img_layers.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/img_trans_layers.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/last_first_seq.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/layer_activations.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/math_ops.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/projections.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/shared_fc.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/shared_lstm.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/simple_rnn_layers.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/test_bi_grumemory.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/test_bilinear_interp.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/test_cost_layers.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/test_cost_layers_with_weight.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/test_expand_layer.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/test_fc.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/test_grumemory_layer.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/test_hsigmoid.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/test_lstmemory_layer.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/test_maxout.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/test_ntm_layers.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/test_print_layer.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/test_rnn_group.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/test_sequence_pooling.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/test_split_datasource.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/test_spp_layer.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/unused_layers.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/configs/util_layers.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/tests/layers_test_config.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/trainer_config_helpers/utils.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/utils/image_util.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/utils/make_model_diagram.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/utils/plotcurve.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/utils/predefined_net.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/utils/preprocess_img.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/utils/preprocess_util.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/utils/show_pb.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
python/paddle/utils/torch2paddle.py
浏览文件 @
a1ba3f44
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录