[英]AxisError: axis 1 is out of bounds for array of dimension 1
enter image description here在此处输入图像描述
This is my code:这是我的代码:
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()
Please help me to fix this.请帮我解决这个问题。
simply change to axis 0, as has only one dimension.只需更改为轴 0,因为只有一维。 Good Luck!祝你好运!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.