47 / 44 / 3
Регистрация: 02.11.2019
Сообщений: 187
|
||||||
1 | ||||||
Ошибка ValueError в NumPy: shapes not aligned16.01.2021, 16:40. Просмотров 1989. Ответов 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 | |
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) Shapes are not aligned |
|
856 / 572 / 157
Регистрация: 07.11.2019
Сообщений: 1,329
|
|
16.01.2021, 18:58 | 2 |
У вас не совпадают размерности массивой, которые используются в 39 строке. Попробуйте перед 39 строкой сделать np.squeeze(training_set_inputs)
1
|
16.01.2021, 18:58 | |
Заказываю контрольные, курсовые, дипломные и любые другие студенческие работы здесь.
Ошибка ValueError: ordinal must be >= 1
Ошибка: ValueError: invalid literal for int() with base 10: 'ads' Ошибка кода: builtins.ValueError: invalid literal for int() with base 10 Объясните, почему возникает ошибка: ValueError: all the input array dimensions except for the concatenation axis must ma Искать еще темы с ответами Или воспользуйтесь поиском по форуму: |