提交 2e97045c 编写于 作者: C chengduoZH

fix layers_test.py

上级 2ae37a4e
...@@ -9,6 +9,6 @@ test_seq_concat_reshape test_pad test_smooth_l1 test_multiplex_layer ...@@ -9,6 +9,6 @@ test_seq_concat_reshape test_pad test_smooth_l1 test_multiplex_layer
test_prelu_layer test_row_conv test_detection_output_layer test_multibox_loss_layer test_prelu_layer test_row_conv test_detection_output_layer test_multibox_loss_layer
test_recursive_topology test_gated_unit_layer test_clip_layer test_row_l2_norm_layer test_recursive_topology test_gated_unit_layer test_clip_layer test_row_l2_norm_layer
test_kmax_seq_socre_layer test_seq_select_layers test_scale_shift_layer test_kmax_seq_socre_layer test_seq_select_layers test_scale_shift_layer
test_seq_slice_layer) test_seq_slice_layer test_conv3d_layer test_deconv3d_layer)
export whole_configs=(test_split_datasource) export whole_configs=(test_split_datasource)
...@@ -14,18 +14,6 @@ padding_y = 1 ...@@ -14,18 +14,6 @@ padding_y = 1
padding_z = 1 padding_z = 1
groups = 1 groups = 1
data1 = data_layer(name='data1', size=2016 * num_channels, height=48, width=42)
img_conv_layer(
input=data1,
filter_size=filter_size,
num_channels=num_channels,
num_filters=16,
stride=stride,
padding=padding,
act=LinearActivation(),
bias_attr=False)
data = data_layer( data = data_layer(
name='data', size=12096 * num_channels, height=48, width=42, depth=6) name='data', size=12096 * num_channels, height=48, width=42, depth=6)
# first # first
...@@ -58,34 +46,4 @@ conv3d_2 = img_conv3d_layer( ...@@ -58,34 +46,4 @@ conv3d_2 = img_conv3d_layer(
trans=False, trans=False,
layer_type="conv3d", layer_type="conv3d",
act=LinearActivation()) act=LinearActivation())
outputs(conv3d_2)
# first
deconv3d_1 = img_conv3d_layer(
input=data,
name='deconv3d_1',
num_filters=16,
num_channels=num_channels,
filter_size=filter_size,
stride=stride,
padding=padding,
groups=groups,
bias_attr=True,
shared_biases=True,
trans=False,
layer_type="deconv3d",
act=LinearActivation())
# second
deconv3d_2 = img_conv3d_layer(
input=data,
name='deconv3d_2',
num_filters=16,
num_channels=num_channels,
filter_size=[filter_size, filter_size_y, filter_size_z],
stride=[stride, stride_y, stride_z],
padding=[padding, padding_y, padding_z],
groups=groups,
bias_attr=True,
shared_biases=True,
trans=False,
layer_type="deconv3d",
act=LinearActivation())
from paddle.trainer_config_helpers import *
settings(batch_size=1000, learning_rate=1e-5)
num_channels = 3
filter_size = 3
filter_size_y = 3
filter_size_z = 3
stride = 2
stride_y = 2
stride_z = 2
padding = 1
padding_y = 1
padding_z = 1
groups = 1
data = data_layer(
name='data', size=12096 * num_channels, height=48, width=42, depth=6)
# first
deconv3d_1 = img_conv3d_layer(
input=data,
name='deconv3d_1',
num_filters=16,
num_channels=num_channels,
filter_size=filter_size,
stride=stride,
padding=padding,
groups=groups,
bias_attr=True,
shared_biases=True,
trans=True,
layer_type="deconv3d",
act=LinearActivation())
# second
deconv3d_2 = img_conv3d_layer(
input=data,
name='deconv3d_2',
num_filters=16,
num_channels=num_channels,
filter_size=[filter_size, filter_size_y, filter_size_z],
stride=[stride, stride_y, stride_z],
padding=[padding, padding_y, padding_z],
groups=groups,
bias_attr=True,
shared_biases=True,
trans=True,
layer_type="deconv3d",
act=LinearActivation())
outputs(deconv3d_2)
...@@ -16,6 +16,5 @@ from paddle.trainer.config_parser import parse_config_and_serialize ...@@ -16,6 +16,5 @@ from paddle.trainer.config_parser import parse_config_and_serialize
if __name__ == '__main__': if __name__ == '__main__':
parse_config_and_serialize( parse_config_and_serialize(
'trainer_config_helpers/tests/configs/conv3d_deconv3d_test_config.py', 'trainer_config_helpers/tests/layers_test_config.py', '')
'')
# layers_test_config.py # layers_test_config.py
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册