关于data接口的shape参数的问题
Created by: yeyupiaoling
环境:
- paddlepaddle 1.1.0
- Python 3.5
- Ubuntu 16.04
- CPU 4个
问题:
我的label值是一个长度为60的一维数组,我的data定义如下:
y = fluid.layers.data(name='y', shape=[1], dtype='float32')
或者
y = fluid.layers.data(name='y', shape=[60], dtype='float32')
那么问题就来了,shape
参数是至数据的维度还是长度?
同样我定义data时
x = fluid.layers.data(name='x', shape=[121, 6], dtype='float32')
或者
x = fluid.layers.data(name='x', shape=[726], dtype='float32')
这两种都可以正常训练,但哪个才是标准的使用方式呢?