提交 88452186 编写于 作者: T tensor-tang

add batchnorm layer in simple test and branch test

上级 4d7eb090
...@@ -89,6 +89,36 @@ tmp = img_pool_layer(input=tmp, ...@@ -89,6 +89,36 @@ tmp = img_pool_layer(input=tmp,
padding=1, padding=1,
pool_type=MaxPooling()) pool_type=MaxPooling())
tmp = img_conv_layer(input=tmp,
filter_size=3,
num_filters=32,
padding=1,
shared_biases=True,
act=LinearActivation(),
bias_attr=False)
tmp = batch_norm_layer(input=tmp,
use_global_stats=False,
act=ReluActivation())
c1 = img_conv_layer(input=tmp,
filter_size=1,
num_filters=32,
padding=0,
shared_biases=True,
act=ReluActivation())
c2 = img_conv_layer(input=tmp,
filter_size=3,
num_filters=32,
padding=1,
shared_biases=True,
act=ReluActivation())
tmp = addto_layer(input=[c1, c2],
act=ReluActivation(),
bias_attr=False)
tmp = fc_layer(input=tmp, size=64, tmp = fc_layer(input=tmp, size=64,
bias_attr=False, bias_attr=False,
act=TanhActivation()) act=TanhActivation())
......
...@@ -38,9 +38,14 @@ tmp = img_pool_layer(input=tmp, ...@@ -38,9 +38,14 @@ tmp = img_pool_layer(input=tmp,
tmp = img_conv_layer(input=tmp, tmp = img_conv_layer(input=tmp,
filter_size=3, filter_size=3,
num_filters=64, num_filters=32,
padding=1, padding=1,
shared_biases=True, shared_biases=True,
act=LinearActivation(),
bias_attr=False)
tmp = batch_norm_layer(input=tmp,
use_global_stats=False,
act=ReluActivation()) act=ReluActivation())
tmp = img_pool_layer(input=tmp, tmp = img_pool_layer(input=tmp,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册