简体   繁体   English

AxisError:轴 1 超出维度 1 数组的范围

[英]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.

相关问题 遇到 AxisError:轴 1 超出维度 0 数组的范围 - Encountering AxisError: axis 1 is out of bounds for array of dimension 0 numpy.AxisError:轴 1 超出维度 1 数组的范围 - numpy 数组 - numpy.AxisError: axis 1 is out of bounds for array of dimension 1 - numpy array 如何解决 AxisError:轴 1 超出维度 0 数组的范围 - How to solve AxisError: axis 1 is out of bounds for array of dimension 0 numpy.AxisError:来源:轴 2 超出了维度 2 数组的范围 - numpy.AxisError: source: axis 2 is out of bounds for array of dimension 2 np.linalg.norm AxisError:轴 1 超出维度 1 数组的范围 - np.linalg.norm AxisError: axis 1 is out of bounds for array of dimension 1 AxisError:计算类的准确性时,轴 1 超出维度 1 数组的范围 - AxisError: axis 1 is out of bounds for array of dimension 1 when calculating accuracy of classes 2D 数组的 median_absolute_deviation 抛出 AxisError: axis 1 is out of bounds for array of dimension 1 - median_absolute_deviation of 2D array throws AxisError: axis 1 is out of bounds for array of dimension 1 AxisError:计算 roc_auc_score 时,轴 1 超出维度 1 数组的范围 - AxisError: axis 1 is out of bounds for array of dimension 1 when calculating roc_auc_score 分类器:轴 1 超出维度 1 数组的范围 - classifier : axis 1 is out of bounds for array of dimension 1 我无法解决“轴-1超出维度0数组的范围”的问题 - I can't solve issue “axis -1 is out of bounds for array of dimension 0”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM