convert trainer_config.conf to binary_conf error
Created by: guozhizou
when i try to convert a paddle trainer_config.conf to a binary conf, got this error:
Traceback (most recent call last):
File "/home/zc04/paddle/paddle_local_env/python27-gcc482/lib/python2.7/site-packages/paddle/trainer/config_parser.py", line 3113, in parse_config_and_serialize
config = parse_config(config_file, config_arg_str)
File "/home/zc04/paddle/paddle_local_env/python27-gcc482/lib/python2.7/site-packages/paddle/trainer/config_parser.py", line 3089, in parse_config
execfile(config_file, make_config_environment(config_file, config_args))
File "trainer_config.conf", line 172, in <module>
with mixed_layer() as mix:
File "/home/zc04/paddle/paddle_local_env/python27-gcc482/lib/python2.7/site-packages/paddle/trainer_config_helpers/default_decorators.py", line 45, in __wrapper__
return func(*args, **kwargs)
File "/home/zc04/paddle/paddle_local_env/python27-gcc482/lib/python2.7/site-packages/paddle/trainer_config_helpers/default_decorators.py", line 45, in __wrapper__
return func(*args, **kwargs)
File "/home/zc04/paddle/paddle_local_env/python27-gcc482/lib/python2.7/site-packages/paddle/trainer_config_helpers/default_decorators.py", line 45, in __wrapper__
return func(*args, **kwargs)
File "/home/zc04/paddle/paddle_local_env/python27-gcc482/lib/python2.7/site-packages/paddle/trainer_config_helpers/layers.py", line 219, in wrapper
return method(*args, **kwargs)
TypeError: mixed_layer() takes at least 1 argument (2 given)
Traceback (most recent call last):
File "convert_conf2binary.py", line 4, in <module>
bin_str = paddle.trainer.config_parser.parse_config_and_serialize(sys.argv[1], "is_predict=1")
File "/home/zc04/paddle/paddle_local_env/python27-gcc482/lib/python2.7/site-packages/paddle/trainer/config_parser.py", line 3113, in parse_config_and_serialize
config = parse_config(config_file, config_arg_str)
File "/home/zc04/paddle/paddle_local_env/python27-gcc482/lib/python2.7/site-packages/paddle/trainer/config_parser.py", line 3089, in parse_config
execfile(config_file, make_config_environment(config_file, config_args))
File "trainer_config.conf", line 172, in <module>
with mixed_layer() as mix:
File "/home/zc04/paddle/paddle_local_env/python27-gcc482/lib/python2.7/site-packages/paddle/trainer_config_helpers/default_decorators.py", line 45, in __wrapper__
return func(*args, **kwargs)
File "/home/zc04/paddle/paddle_local_env/python27-gcc482/lib/python2.7/site-packages/paddle/trainer_config_helpers/default_decorators.py", line 45, in __wrapper__
return func(*args, **kwargs)
File "/home/zc04/paddle/paddle_local_env/python27-gcc482/lib/python2.7/site-packages/paddle/trainer_config_helpers/default_decorators.py", line 45, in __wrapper__
return func(*args, **kwargs)
File "/home/zc04/paddle/paddle_local_env/python27-gcc482/lib/python2.7/site-packages/paddle/trainer_config_helpers/layers.py", line 219, in wrapper
return method(*args, **kwargs)
TypeError: mixed_layer() takes at least 1 argument (2 given)
trainer_config.conf error code:
164 for i, d in enumerate(view_input_dims):
165 view_dim = MLP(input=views['view_input%d' % (i+1)], size=d) \
166 .add(act='relu', size=views_hiddens[i][0], name='v%dh1' % (i+1), sparse_update=True) \
167 .add(act='relu', size=views_hiddens[i][1], name='v%dh2' % (i+1)) \
168 .add(act='tanh', size=dim, name='v%dh3' % (i+1)) \
169 .vec
170 # .residual(batch_norm=False, name='vresidual1_%d' % (i+1)) \
171
172 with mixed_layer() as mix:
173 mix += dotmul_operator(a=view_dim, b=masks['mask%d' % (i+1)], scale=1)
174 view_dims.append(mix)
175
176 view_dim = addto_layer(input=view_dims, act=IdentityActivation())
177 predict = cos_sim(a=user_dim, b=view_dim, scale=1)
any suggestions? thanks in advance.