From 21b70c6c00686eb7a3b1b70af3820e03f47966fe Mon Sep 17 00:00:00 2001 From: Takato Kimura <4ui.iurz1@gmail.com> Date: Sat, 20 Apr 2019 08:15:08 +0900 Subject: [PATCH] Fix usage --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a187d85..d5d81ee 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,8 @@ model.compile(loss='categorical_crossentropy', optimizer=Adam(), metrics=['accuracy']) -model.fit(x_train, y_train, +model.fit([x_train, y_train], + y_train, batch_size=batch_size, epochs=epochs, verbose=1, @@ -41,7 +42,7 @@ model.fit(x_train, y_train, ### Test ```python model.load_weights('model.hdf5') -model = Model(inputs=model.input, outputs=model.layers[-3].output) +model = Model(inputs=model.input[0], outputs=model.layers[-3].output) embedded_features = model.predict(x_test, verbose=1) embedded_features /= np.linalg.norm(embedded_features, axis=1, keepdims=True) ```