Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #baris ke 68
- #train the model using the Adam optimizer
- print("[INFO] training network...")
- opt = Adam(lr=1e-3, decay=1e-3 / 50)
- model.compile(loss="categorical_crossentropy", optimizer=opt
- metrics=["accuracy"])
- H = model.fit(trainX, trainY, validation_data=(testX, testY),
- epochs=50, batch_size=32)
- #evaluate the network
- print("[INFO] evaluating network...")
- predictions = model.predict(testX, batch_size=32)
- print(classification_report(testY.argmax(axis=1),
- predictions.argmmax(axis=1), target_names=lb.classes_))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement