【发布时间】:2017-11-16 16:53:13
【问题描述】:
我正在尝试使用 tensorflow 将时间序列数据建模到卷积神经网络中。 我的时间序列数据格式如下
[timestamp, x, y, z]
我想为三个通道(x、y、z)创建 300 个时间戳窗口。因此,我对数据进行了如下预处理,当我将其输入到 tf.layers.conv1d 时,我使用以下重塑的输入
[1]
[x,y,z],[x,y,z],...[x,y,z] of size 3*300
#input shape is [-1, 3*300]
input = tf.reshape(input, shape = [-1, 300, 3])
#input shape is [-1, 300, 3]
[2]
[x,x,..x],[y,y,..y],[z,z...z] of size 300*3
#input shape is [-1, 300*3]
input = tf.reshape(input, shape = [-1, 300, 3])
#input shape is [-1, 300, 3]
考虑到我的原始数据集,哪些版本是正确的重塑? 还是两者都不对?在那种情况下,将这些数据输入卷积层的正确方法是什么?
我都尝试过,但准确度结果非常低(低于 40%)。
提前致谢!
【问题讨论】:
标签: python tensorflow