Mavzu: sun'iy neyron tarmoq modeli mashinali o’qitish fanidan


Neyon tarmoqni o’qitish paramertlarini(o’qish qadami-lr, o’qitishlar soni-epoch) tanlang


Download 0.53 Mb.
bet3/3
Sana04.04.2023
Hajmi0.53 Mb.
#1326520
1   2   3
Bog'liq
Xojiakbar 611 20 mustaqil ishi-1

. Neyon tarmoqni o’qitish paramertlarini(o’qish qadami-lr, o’qitishlar soni-epoch) tanlang.
optimizer = Adam(learning_rate=0.001)
model.compile(optimizer, loss='categorical_crossentropy', metrics=['accuracy'])
history = model.fit(train_x, train_y, verbose=2, batch_size=5, epochs=200)


Neyron tarmoqning o’qitish natijalarini garfik tarvirlang.
Grafikda tasvirlab ko’ramiz.
plt.figure(figsize=(14,2))

plt.subplot(131)


plt.plot(history.history['accuracy'])
plt.title('Model accuracy')
plt.ylabel('Accuracy')
plt.xlabel('Epoch')
plt.grid()

plt.subplot(132)


plt.plot(history.history['loss'])
plt.title('Model loss')
plt.ylabel('Loss')
plt.xlabel('Epoch')
plt.grid()
plt.show()



Model aniqligini hisoblang(o’rgatuvchi tanalama uchun).

Modelni test to’plam bilan testlang. Modelini test to’plamdagi aniqligini hisoblang.



Download 0.53 Mb.

Do'stlaringiz bilan baham:
1   2   3




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling