60 / 57 / 3
Регистрация: 02.11.2019
Сообщений: 227
|
||||||
1 | ||||||
Ошибка ValueError в NumPy: shapes not aligned16.01.2021, 16:40. Показов 12328. Ответов 1
Метки нет (Все метки)
Добрый день! Я хочу сделать алгоритм распознавания изображений помощью только numpy и PIL. При выполнении кода вылезает ошибка:
Код
Traceback (most recent call last): File "index.py", line 39, in <module> synaptic_weights += dot(training_set_inputs.T, (training_set_outputs - output) * output * (1 - output)) File "<__array_function__ internals>", line 5, in dot ValueError: shapes (400,16,1) and (16,16) not aligned: 1 (dim 2) != 16 (dim 0)
0
|
16.01.2021, 16:40 | |
Ответы с готовыми решениями:
1
VAlueError: shapes (2,) and (1,) not aligned ValueError: shapes (100,784) and (0,1) not aligned Ошибка c графиком: ValueError: x and y must have same first dimension, but have shapes (49,) and (1,) ValueError: shapes (100,784) and (100,1) not aligned: 784 (dim 1) != 100 (dim 0) Ошибка ValueError: shapes (288144,2) and (3,) not aligned: 2 (dim 1) != 3 (dim 0) |
4921 / 2674 / 550
Регистрация: 07.11.2019
Сообщений: 4,395
|
|
16.01.2021, 18:58 | 2 |
У вас не совпадают размерности массивой, которые используются в 39 строке. Попробуйте перед 39 строкой сделать np.squeeze(training_set_inputs)
1
|
16.01.2021, 18:58 | |
16.01.2021, 18:58 | |
Помогаю со студенческими работами здесь
2
Shapes are not aligned ValueError: operands could not be broadcast together with shapes (81,9) (9,9) (81,9) ValueError: x and y must have same first dimension, but have shapes (50,) and (1,) почему так? Y не считается? NumPy ValueError Ошибка ValueError Ошибка valueerror на питоне Искать еще темы с ответами Или воспользуйтесь поиском по форуму: |