![](/img/trans.png)
[英]Encountering AxisError: axis 1 is out of bounds for array of dimension 0
[英]AxisError: axis 1 is out of bounds for array of dimension 1
這是我的代碼:
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()
請幫我解決這個問題。
只需更改為軸 0,因為只有一維。 祝你好運!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.