[Python] I am getting this error ValueError: Object arrays cannot be loaded when...

Discussão em 'Python' iniciado por Stack, Maio 5, 2025.

  1. Stack

    Stack Membro Participativo

    from sklearn.model_selection import train_test_split

    from keras.utils import to_categorical

    from keras.models import Sequential
    from keras.layers import LSTM, Dense
    from keras.callbacks import TensorBoard
    label_map = {label:num for num, label in enumerate(actions)}
    sequences, labels = [], []
    for action in actions:
    for sequence in range(no_sequences):
    window = []
    for frame_num in range(sequence_length):
    res = np.load(os.path.join(DATA_PATH, action, str(sequence), "{}.npy".format(frame_num)))`ERROR`
    window.append(res)`your text`
    sequences.append(window)
    labels.append(label_map[action])


    Error occurs in the line np.load() method while loading .npy array.

    Continue reading...

Compartilhe esta Página