StaticInputV2 in Docker Container no attribute to_proto
Created by: gibiansky
I get the following error:
File "paddlepaddle.py", line 205, in build_model
parameters = paddle.parameters.create(losses)
File "/usr/local/lib/python2.7/dist-packages/paddle/v2/parameters.py", line 19, in create
topology = Topology(layers)
File "/usr/local/lib/python2.7/dist-packages/paddle/v2/topology.py", line 69, in __init__
layers, extra_layers=extra_layers)
File "/usr/local/lib/python2.7/dist-packages/paddle/v2/layer.py", line 96, in parse_network
return __parse__(__real_func__)
File "/usr/local/lib/python2.7/dist-packages/paddle/trainer_config_helpers/config_parser_utils.py", line 32, in parse_network_config
config = config_parser.parse_config(network_conf, config_arg_str)
File "/usr/local/lib/python2.7/dist-packages/paddle/trainer/config_parser.py", line 3597, in parse_config
trainer_config()
File "/usr/local/lib/python2.7/dist-packages/paddle/v2/layer.py", line 89, in __real_func__
real_output = [each.to_proto(context=context) for each in output_layers]
File "/usr/local/lib/python2.7/dist-packages/paddle/v2/config_base.py", line 109, in to_proto
context=context)
File "/usr/local/lib/python2.7/dist-packages/paddle/v2/config_base.py", line 109, in to_proto
context=context)
File "/usr/local/lib/python2.7/dist-packages/paddle/v2/config_base.py", line 109, in to_proto
context=context)
File "/usr/local/lib/python2.7/dist-packages/paddle/v2/config_base.py", line 112, in to_proto
self.__parent_layers__[layer_name])
File "/usr/local/lib/python2.7/dist-packages/paddle/v2/config_base.py", line 111, in <lambda>
v1_layer = map(lambda x: x.to_proto(context=context),
File "/usr/local/lib/python2.7/dist-packages/paddle/v2/config_base.py", line 112, in to_proto
self.__parent_layers__[layer_name])
File "/usr/local/lib/python2.7/dist-packages/paddle/v2/config_base.py", line 111, in <lambda>
v1_layer = map(lambda x: x.to_proto(context=context),
File "/usr/local/lib/python2.7/dist-packages/paddle/v2/config_base.py", line 112, in to_proto
self.__parent_layers__[layer_name])
File "/usr/local/lib/python2.7/dist-packages/paddle/v2/config_base.py", line 111, in <lambda>
v1_layer = map(lambda x: x.to_proto(context=context),
File "/usr/local/lib/python2.7/dist-packages/paddle/v2/config_base.py", line 112, in to_proto
self.__parent_layers__[layer_name])
File "/usr/local/lib/python2.7/dist-packages/paddle/v2/config_base.py", line 111, in <lambda>
v1_layer = map(lambda x: x.to_proto(context=context),
AttributeError: 'StaticInputV2' object has no attribute 'to_proto'
The code is
for i in range(layers):
if static is not None:
inputs = [inputs, paddle.layer.StaticInputV2(static)]
fwd = paddle.networks.lstmemory_group(input=inputs, size=size)
bwd = paddle.networks.lstmemory_group(input=inputs, size=size, reverse=True)
inputs = paddle.layer.concat(input=[fwd, bwd])
final_states = paddle.layer.concat(input=[
paddle.layer.last_seq(input=fwd),
paddle.layer.first_seq(input=bwd),
])
return final_states, inputs
paddle.layer.StaticInput
does not exist, only paddle.layer.StaticInputV2
.
static
(in the code above) is created by a paddle.layer.concat
operation.
I have also tried paddle.networks.simple_lstm
in place of paddle.networks.lstmemory_group
.
I don't understand what is happening or why this error occurs. Please help me figure it out!