Я хочу предсказать координаты x, y на основе n входов с использованием керас. Мне неясно, почему моя сеть не улучшится примерно через 5 эпох. Я не понимаю, почему сетевые значения, такие как х = 2,9 и у = 2,1, если мои входные переменные варьируются от 5-14 (х) и 5-11 (у). Как я могу получить лучшие прогнозы?
Данные:
input:
[[-92. 0. -83. 0. 0. 0. ]
[ 0. 0. 0. -82. 0. 0. ]
...
[-65.5 -82. 0. 0. 0. 0. ]]
output:
[[ 5 5]
[ 5 5]
...
[11 14]]
Results:
Predicted: [4.396636 4.019871] label: [11 14] Difference: 16.583492755889893
Predicted: [2.9728146 2.1784768] label: [11 14] Difference: 19.848708629608154
Predicted: [3.9281645 4.2113876] label: [11 14] Difference: 16.860447883605957
Сеть:
from keras.models import Sequential
from keras.layers import *
model = Sequential()
model.add(Dense(16, input_dim = ipad_test_numpy_input.shape[1], activation='linear'))
model.add(Dense(8, activation='linear'))
model.add(Dense(2, activation='linear'))
model.compile(loss='mean_squared_error', optimizer='adam')
model.fit(ipad_numpy_input, ipad_numpy_labels, epochs=50, batch_size=5)
score = model.evaluate(ipad_test_numpy_input, ipad_test_numpy_labels, batch_size=5)