boot layer for lstmemory_group can not be created.
Created by: lcy-seso
I write a simple test code:
import paddle.v2 as paddle
from paddle.v2.layer import parse_network
data = paddle.layer.data(
name="x", type=paddle.data_type.dense_vector_sequence(128))
lstm = paddle.networks.lstmemory_group(
input=data,
memory_boot=paddle.layer.data(
name="boot", type=paddle.data_type.dense_vector(128)))
print parse_network(lstm)
Here is the outputs, it can be found that memory_boot
of lstmemory_group
is not created.
type: "recurrent_nn"
layers {
name: "x"
type: "data"
size: 128
active_type: ""
}
layers {
name: "__lstm_group_0___recurrent_group"
type: "recurrent_layer_group"
active_type: ""
}
layers {
name: "x@__lstm_group_0___recurrent_group"
type: "scatter_agent"
size: 128
active_type: ""
}
layers {
name: "__lstm_group_0__+delay1@__lstm_group_0___recurrent_group"
type: "agent"
size: 32
active_type: ""
}
layers {
name: "__lstm_group_0___state+delay1@__lstm_group_0___recurrent_group"
type: "agent"
size: 32
active_type: ""
}
layers {
name: "__lstm_group_0___input_recurrent@__lstm_group_0___recurrent_group"
type: "mixed"
size: 128
active_type: ""
inputs {
input_layer_name: "x@__lstm_group_0___recurrent_group"
proj_conf {
type: "identity"
name: "___lstm_group_0___input_recurrent.w0"
input_size: 128
output_size: 128
}
}
inputs {
input_layer_name: "__lstm_group_0__+delay1@__lstm_group_0___recurrent_group"
input_parameter_name: "___lstm_group_0___input_recurrent@__lstm_group_0___recurrent_group.w1"
proj_conf {
type: "fc"
name: "___lstm_group_0___input_recurrent.w1"
input_size: 32
output_size: 128
}
}
}
layers {
name: "__lstm_group_0__@__lstm_group_0___recurrent_group"
type: "lstm_step"
size: 32
active_type: "tanh"
inputs {
input_layer_name: "__lstm_group_0___input_recurrent@__lstm_group_0___recurrent_group"
}
inputs {
input_layer_name: "__lstm_group_0___state+delay1@__lstm_group_0___recurrent_group"
}
bias_parameter_name: "___lstm_group_0__@__lstm_group_0___recurrent_group.wbias"
active_gate_type: "sigmoid"
active_state_type: "sigmoid"
}
layers {
name: "__lstm_group_0___state@__lstm_group_0___recurrent_group"
type: "get_output"
size: 32
active_type: ""
inputs {
input_layer_name: "__lstm_group_0__@__lstm_group_0___recurrent_group"
input_layer_argument: "state"
}
}
layers {
name: "__lstm_group_0__"
type: "gather_agent"
size: 32
active_type: ""
}
parameters {
name: "___lstm_group_0___input_recurrent@__lstm_group_0___recurrent_group.w1"
size: 4096
initial_mean: 0.0
initial_std: 0.176776695297
dims: 32
dims: 128
initial_strategy: 0
initial_smart: true
}
parameters {
name: "___lstm_group_0__@__lstm_group_0___recurrent_group.wbias"
size: 96
initial_mean: 0.0
initial_std: 0.0
dims: 1
dims: 96
initial_strategy: 0
initial_smart: false
}
input_layer_names: "x"
output_layer_names: "__lstm_group_0__"
sub_models {
name: "root"
layer_names: "x"
layer_names: "__lstm_group_0___recurrent_group"
layer_names: "__lstm_group_0__"
input_layer_names: "x"
output_layer_names: "__lstm_group_0__"
is_recurrent_layer_group: false
reversed: false
}
sub_models {
name: "__lstm_group_0___recurrent_group"
layer_names: "x@__lstm_group_0___recurrent_group"
layer_names: "__lstm_group_0__+delay1@__lstm_group_0___recurrent_group"
layer_names: "__lstm_group_0___state+delay1@__lstm_group_0___recurrent_group"
layer_names: "__lstm_group_0___input_recurrent@__lstm_group_0___recurrent_group"
layer_names: "__lstm_group_0__@__lstm_group_0___recurrent_group"
layer_names: "__lstm_group_0___state@__lstm_group_0___recurrent_group"
is_recurrent_layer_group: true
reversed: false
memories {
layer_name: "__lstm_group_0__@__lstm_group_0___recurrent_group"
link_name: "__lstm_group_0__+delay1@__lstm_group_0___recurrent_group"
}
memories {
layer_name: "__lstm_group_0___state@__lstm_group_0___recurrent_group"
link_name: "__lstm_group_0___state+delay1@__lstm_group_0___recurrent_group"
}
in_links {
layer_name: "x"
link_name: "x@__lstm_group_0___recurrent_group"
}
out_links {
layer_name: "__lstm_group_0__@__lstm_group_0___recurrent_group"
link_name: "__lstm_group_0__"
}
}