【发布时间】:2019-10-06 10:35:23
【问题描述】:
这是我的代码:
config = Config(mode='conv')
if config.mode == 'conv':
X, y = build_rand_feat()
y_flat = np.argmax(y, axis=1)
model=get_conv_model()
elif config.mode == 'time':
X, y = build_rand_feat()
y_flat = np.argmax(y,axis=1)
input_shape = (X.shape[1], X.shape[2])
model = get_recurrent_model()
请帮我解决这个问题。
【问题讨论】:
-
错误很明显,你不能对一维数据执行
axis=1。你可以做axis=0,但我们不知道数据是什么或你期望发生什么,所以我不能确定这是否是你需要的
标签: python arrays artificial-intelligence