-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use diff to compare config unittest (#363)
Fix #342
- Loading branch information
1 parent
93e4d0c
commit c64cd6f
Showing
26 changed files
with
4,371 additions
and
25 deletions.
There are no files selected for viewing
23 changes: 0 additions & 23 deletions
23
python/paddle/trainer_config_helpers/tests/configs/check.md5
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
176 changes: 176 additions & 0 deletions
176
python/paddle/trainer_config_helpers/tests/configs/protostr/img_layers.protostr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
type: "nn" | ||
layers { | ||
name: "image" | ||
type: "data" | ||
size: 65536 | ||
active_type: "" | ||
} | ||
layers { | ||
name: "__conv_0__" | ||
type: "exconv" | ||
size: 3297856 | ||
active_type: "" | ||
inputs { | ||
input_layer_name: "image" | ||
input_parameter_name: "___conv_0__.w0" | ||
conv_conf { | ||
filter_size: 32 | ||
channels: 1 | ||
stride: 1 | ||
padding: 1 | ||
groups: 1 | ||
filter_channels: 1 | ||
output_x: 227 | ||
img_size: 256 | ||
caffe_mode: true | ||
filter_size_y: 32 | ||
padding_y: 1 | ||
stride_y: 1 | ||
} | ||
} | ||
bias_parameter_name: "___conv_0__.wbias" | ||
num_filters: 64 | ||
shared_biases: true | ||
} | ||
layers { | ||
name: "__batch_norm_0__" | ||
type: "batch_norm" | ||
size: 3297856 | ||
active_type: "relu" | ||
inputs { | ||
input_layer_name: "__conv_0__" | ||
input_parameter_name: "___batch_norm_0__.w0" | ||
image_conf { | ||
channels: 64 | ||
img_size: 227 | ||
} | ||
} | ||
inputs { | ||
input_layer_name: "__conv_0__" | ||
input_parameter_name: "___batch_norm_0__.w1" | ||
} | ||
inputs { | ||
input_layer_name: "__conv_0__" | ||
input_parameter_name: "___batch_norm_0__.w2" | ||
} | ||
bias_parameter_name: "___batch_norm_0__.wbias" | ||
moving_average_fraction: 0.9 | ||
} | ||
layers { | ||
name: "__crmnorm_0__" | ||
type: "norm" | ||
size: 3297856 | ||
active_type: "" | ||
inputs { | ||
input_layer_name: "__batch_norm_0__" | ||
norm_conf { | ||
norm_type: "cmrnorm-projection" | ||
channels: 64 | ||
size: 32 | ||
scale: 0.0004 | ||
pow: 0.75 | ||
output_x: 227 | ||
img_size: 227 | ||
blocked: false | ||
} | ||
} | ||
} | ||
layers { | ||
name: "__pool_0__" | ||
type: "pool" | ||
size: 2458624 | ||
active_type: "" | ||
inputs { | ||
input_layer_name: "__conv_0__" | ||
pool_conf { | ||
pool_type: "max-projection" | ||
channels: 64 | ||
size_x: 32 | ||
stride: 1 | ||
output_x: 196 | ||
img_size: 227 | ||
padding: 0 | ||
size_y: 32 | ||
stride_y: 1 | ||
output_y: 196 | ||
img_size_y: 227 | ||
padding_y: 0 | ||
} | ||
} | ||
} | ||
parameters { | ||
name: "___conv_0__.w0" | ||
size: 65536 | ||
initial_mean: 0.0 | ||
initial_std: 0.0441941738242 | ||
initial_strategy: 0 | ||
initial_smart: false | ||
} | ||
parameters { | ||
name: "___conv_0__.wbias" | ||
size: 64 | ||
initial_mean: 0.0 | ||
initial_std: 0.0 | ||
dims: 64 | ||
dims: 1 | ||
initial_strategy: 0 | ||
initial_smart: false | ||
} | ||
parameters { | ||
name: "___batch_norm_0__.w0" | ||
size: 64 | ||
initial_mean: 1.0 | ||
initial_std: 0.0 | ||
initial_strategy: 0 | ||
initial_smart: false | ||
} | ||
parameters { | ||
name: "___batch_norm_0__.w1" | ||
size: 64 | ||
initial_mean: 0.0 | ||
initial_std: 0.0 | ||
dims: 1 | ||
dims: 64 | ||
initial_strategy: 0 | ||
initial_smart: false | ||
is_static: true | ||
is_shared: true | ||
} | ||
parameters { | ||
name: "___batch_norm_0__.w2" | ||
size: 64 | ||
initial_mean: 0.0 | ||
initial_std: 0.0 | ||
dims: 1 | ||
dims: 64 | ||
initial_strategy: 0 | ||
initial_smart: false | ||
is_static: true | ||
is_shared: true | ||
} | ||
parameters { | ||
name: "___batch_norm_0__.wbias" | ||
size: 64 | ||
initial_mean: 0.0 | ||
initial_std: 0.0 | ||
dims: 1 | ||
dims: 64 | ||
initial_strategy: 0 | ||
initial_smart: false | ||
} | ||
input_layer_names: "image" | ||
output_layer_names: "__pool_0__" | ||
output_layer_names: "__crmnorm_0__" | ||
sub_models { | ||
name: "root" | ||
layer_names: "image" | ||
layer_names: "__conv_0__" | ||
layer_names: "__batch_norm_0__" | ||
layer_names: "__crmnorm_0__" | ||
layer_names: "__pool_0__" | ||
input_layer_names: "image" | ||
output_layer_names: "__pool_0__" | ||
output_layer_names: "__crmnorm_0__" | ||
is_recurrent_layer_group: false | ||
} | ||
|
69 changes: 69 additions & 0 deletions
69
python/paddle/trainer_config_helpers/tests/configs/protostr/last_first_seq.protostr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
type: "nn" | ||
layers { | ||
name: "data" | ||
type: "data" | ||
size: 30 | ||
active_type: "" | ||
} | ||
layers { | ||
name: "__first_seq_0__" | ||
type: "seqlastins" | ||
size: 30 | ||
active_type: "linear" | ||
inputs { | ||
input_layer_name: "data" | ||
} | ||
select_first: true | ||
trans_type: "seq" | ||
} | ||
layers { | ||
name: "__first_seq_1__" | ||
type: "seqlastins" | ||
size: 30 | ||
active_type: "linear" | ||
inputs { | ||
input_layer_name: "data" | ||
} | ||
select_first: true | ||
trans_type: "non-seq" | ||
} | ||
layers { | ||
name: "__last_seq_0__" | ||
type: "seqlastins" | ||
size: 30 | ||
active_type: "linear" | ||
inputs { | ||
input_layer_name: "data" | ||
} | ||
trans_type: "seq" | ||
} | ||
layers { | ||
name: "__last_seq_1__" | ||
type: "seqlastins" | ||
size: 30 | ||
active_type: "linear" | ||
inputs { | ||
input_layer_name: "data" | ||
} | ||
trans_type: "non-seq" | ||
} | ||
input_layer_names: "data" | ||
output_layer_names: "__first_seq_0__" | ||
output_layer_names: "__first_seq_1__" | ||
output_layer_names: "__last_seq_0__" | ||
output_layer_names: "__last_seq_1__" | ||
sub_models { | ||
name: "root" | ||
layer_names: "data" | ||
layer_names: "__first_seq_0__" | ||
layer_names: "__first_seq_1__" | ||
layer_names: "__last_seq_0__" | ||
layer_names: "__last_seq_1__" | ||
input_layer_names: "data" | ||
output_layer_names: "__first_seq_0__" | ||
output_layer_names: "__first_seq_1__" | ||
output_layer_names: "__last_seq_0__" | ||
output_layer_names: "__last_seq_1__" | ||
is_recurrent_layer_group: false | ||
} | ||
|
Oops, something went wrong.