Skip to content

Commit

Permalink
Fix usage
Browse files Browse the repository at this point in the history
  • Loading branch information
4uiiurz1 committed Apr 19, 2019
1 parent 05fa3e0 commit 21b70c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
```
Expand Down

0 comments on commit 21b70c6

Please sign in to comment.