数据产生和传输问题
Created by: ssdyue
仿照官方demo,自己写了一个PLS算法的demo,但是会报如下错误: root@d67cca36a094:/home/Paddle# ./train.sh
I0531 08:58:33.142344 2255 Util.cpp:161] commandline: /usr/bin/../opt/paddle/bin/paddle_trainer --config=trainer_config.py --save_dir=./output --use_gpu=0 --trainer_count=4
[CRITICAL 2017-05-31 08:58:33,320 layer_math.py:106] At least one of the operand of '*' must be a number or a LayerOutput with size=1
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/paddle/trainer/config_parser.py", line 3599, in parse_config_and_serialize
config = parse_config(trainer_config, config_arg_str)
File "/usr/local/lib/python2.7/dist-packages/paddle/trainer/config_parser.py", line 3592, in parse_config
make_config_environment(trainer_config, config_args))
File "trainer_config.py", line 40, in <module>
canY = plss.comput(pc=pc, CV=CV, data_xx=data_xx, data_yy=data_yy)
File "/home/Paddle/PLS.py", line 30, in comput
w = np.true_divide(w, np.sqrt(np.dot(w.T, w)))
File "/usr/local/lib/python2.7/dist-packages/paddle/trainer_config_helpers/layer_math.py", line 106, in mul
logger.fatal("At least one of the operand of '*' must be a number"
File "/usr/local/lib/python2.7/dist-packages/paddle/trainer/config_parser.py", line 3509, in my_fatal
raise Exception()
Exception
不知是否是数据传输问题?数据的传输问题一直不是很明白!!!(以自己的理解,数据由dataprovider.py定义,然后由train_config.py中的数据源配置,产生数据,在通过datalayer,将数据传送到模型中进行训练)