Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
880774d1
P
Paddle
项目概览
Crayon鑫
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
880774d1
编写于
11月 09, 2016
作者:
H
Haonan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change the act.name for LinearActivation() to "linear" so that it won't
fail in hl_activetype; also fix the hasinputsset in submodel
上级
8d4c453b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
10 addition
and
10 deletion
+10
-10
python/paddle/trainer/config_parser.py
python/paddle/trainer/config_parser.py
+5
-5
python/paddle/trainer_config_helpers/activations.py
python/paddle/trainer_config_helpers/activations.py
+4
-4
python/paddle/trainer_config_helpers/layers.py
python/paddle/trainer_config_helpers/layers.py
+1
-1
未找到文件。
python/paddle/trainer/config_parser.py
浏览文件 @
880774d1
...
...
@@ -218,7 +218,7 @@ def Inputs(*args):
@
config_func
def
HasInputsSet
():
return
len
(
g_c
onfig
.
model_config
.
input_layer_names
)
!=
0
return
len
(
g_c
urrent_submodel
.
input_layer_names
)
!=
0
# Define the name of the output layers of the NeuralNetwork.
...
...
@@ -1120,14 +1120,14 @@ def parse_block_expand(block_expand, input_layer_name, block_expand_conf):
block_expand_conf
.
output_x
=
0
else
:
block_expand_conf
.
output_x
=
cnn_output_size
(
block_expand
.
img_size_x
,
block_expand
.
block_x
,
block_expand
.
img_size_x
,
block_expand
.
block_x
,
block_expand
.
padding_x
,
block_expand
.
stride_x
,
False
)
if
block_expand_conf
.
img_size_y
==
0
:
block_expand_conf
.
output_y
=
0
else
:
block_expand_conf
.
output_y
=
cnn_output_size
(
block_expand
.
img_size_y
,
block_expand
.
block_y
,
block_expand
.
img_size_y
,
block_expand
.
block_y
,
block_expand
.
padding_y
,
block_expand
.
stride_y
,
False
)
def
parse_maxout
(
maxout
,
input_layer_name
,
maxout_conf
):
...
...
@@ -1135,7 +1135,7 @@ def parse_maxout(maxout, input_layer_name, maxout_conf):
maxout_conf
.
groups
=
maxout
.
groups
maxout_conf
.
img_size_x
=
maxout
.
img_size_x
maxout_conf
.
img_size_y
=
maxout
.
img_size_y
# Define an evaluator
@
config_func
def
Evaluator
(
...
...
@@ -1773,7 +1773,7 @@ class MaxOutLayer(LayerBase):
self
.
config
.
inputs
[
0
].
maxout_conf
)
maxout_conf
=
self
.
config
.
inputs
[
0
].
maxout_conf
self
.
set_layer_size
(
g_layer_map
[
input_layer
.
name
].
size
/
maxout_conf
.
groups
)
# key: cost type
# value: cost class
g_cost_map
=
{}
...
...
python/paddle/trainer_config_helpers/activations.py
浏览文件 @
880774d1
...
...
@@ -23,9 +23,9 @@ __all__ = ["TanhActivation", "SigmoidActivation",
class
BaseActivation
(
object
):
"""
A mark for activation class.
A mark for activation class.
Each activation inherit BaseActivation, which has two parameters.
:param name: activation name in paddle config.
:type name: basestring
:param support_hppl: True if supported by hppl. HPPL is a library used by paddle
...
...
@@ -104,7 +104,7 @@ class IdentityActivation(BaseActivation):
Just do nothing for output both forward/backward.
"""
def
__init__
(
self
):
BaseActivation
.
__init__
(
self
,
''
,
False
)
def
__init__
(
self
):
BaseActivation
.
__init__
(
self
,
'
linear
'
,
False
)
LinearActivation
=
IdentityActivation
...
...
@@ -194,7 +194,7 @@ class SquareActivation(BaseActivation):
class
ExpActivation
(
BaseActivation
):
"""
Exponential Activation.
.. math::
f(z) = e^z.
"""
...
...
python/paddle/trainer_config_helpers/layers.py
浏览文件 @
880774d1
...
...
@@ -1657,7 +1657,7 @@ def img_pool_layer(input, pool_size, name=None,
:type pool_size_y: int|None
:param num_channels: number of input channel.
:type num_channels: int
:param pool_type: pooling type. MaxPooling or Av
erage
Pooling. Default is
:param pool_type: pooling type. MaxPooling or Av
g
Pooling. Default is
MaxPooling.
:type pool_type: BasePoolingType
:param stride: stride width of pooling.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录