Merge pull request #3594 from chengduoZH/Adapting_to_the_BatchNorm_structure_to_support_3D_data
Adapting to the BatchNorm structure to support 3D dataenforce_failed
commit
0be349496f
@ -0,0 +1,92 @@
|
||||
type: "nn"
|
||||
layers {
|
||||
name: "data3D"
|
||||
type: "data"
|
||||
size: 360
|
||||
active_type: ""
|
||||
height: 6
|
||||
width: 20
|
||||
depth: 3
|
||||
}
|
||||
layers {
|
||||
name: "__batch_norm_0__"
|
||||
type: "batch_norm"
|
||||
size: 360
|
||||
active_type: "relu"
|
||||
inputs {
|
||||
input_layer_name: "data3D"
|
||||
input_parameter_name: "___batch_norm_0__.w0"
|
||||
image_conf {
|
||||
channels: 1
|
||||
img_size: 20
|
||||
img_size_y: 6
|
||||
img_size_z: 3
|
||||
}
|
||||
}
|
||||
inputs {
|
||||
input_layer_name: "data3D"
|
||||
input_parameter_name: "___batch_norm_0__.w1"
|
||||
}
|
||||
inputs {
|
||||
input_layer_name: "data3D"
|
||||
input_parameter_name: "___batch_norm_0__.w2"
|
||||
}
|
||||
bias_parameter_name: "___batch_norm_0__.wbias"
|
||||
moving_average_fraction: 0.9
|
||||
height: 6
|
||||
width: 20
|
||||
depth: 3
|
||||
}
|
||||
parameters {
|
||||
name: "___batch_norm_0__.w0"
|
||||
size: 1
|
||||
initial_mean: 1.0
|
||||
initial_std: 0.0
|
||||
initial_strategy: 0
|
||||
initial_smart: false
|
||||
}
|
||||
parameters {
|
||||
name: "___batch_norm_0__.w1"
|
||||
size: 1
|
||||
initial_mean: 0.0
|
||||
initial_std: 0.0
|
||||
dims: 1
|
||||
dims: 1
|
||||
initial_strategy: 0
|
||||
initial_smart: false
|
||||
is_static: true
|
||||
is_shared: true
|
||||
}
|
||||
parameters {
|
||||
name: "___batch_norm_0__.w2"
|
||||
size: 1
|
||||
initial_mean: 0.0
|
||||
initial_std: 0.0
|
||||
dims: 1
|
||||
dims: 1
|
||||
initial_strategy: 0
|
||||
initial_smart: false
|
||||
is_static: true
|
||||
is_shared: true
|
||||
}
|
||||
parameters {
|
||||
name: "___batch_norm_0__.wbias"
|
||||
size: 1
|
||||
initial_mean: 0.0
|
||||
initial_std: 0.0
|
||||
dims: 1
|
||||
dims: 1
|
||||
initial_strategy: 0
|
||||
initial_smart: false
|
||||
}
|
||||
input_layer_names: "data3D"
|
||||
output_layer_names: "__batch_norm_0__"
|
||||
sub_models {
|
||||
name: "root"
|
||||
layer_names: "data3D"
|
||||
layer_names: "__batch_norm_0__"
|
||||
input_layer_names: "data3D"
|
||||
output_layer_names: "__batch_norm_0__"
|
||||
is_recurrent_layer_group: false
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,11 @@
|
||||
from paddle.trainer_config_helpers import *
|
||||
|
||||
settings(batch_size=1000, learning_rate=1e-4)
|
||||
|
||||
#data = data_layer(name='data', size=180, width=30, height=6)
|
||||
#batchNorm = batch_norm_layer(data, num_channels=1)
|
||||
#outputs(batchNorm)
|
||||
|
||||
data3D = data_layer(name='data3D', size=120 * 3, width=20, height=6, depth=3)
|
||||
batchNorm3D = batch_norm_layer(data3D, num_channels=1, img3D=True)
|
||||
outputs(batchNorm3D)
|
Loading…
Reference in new issue