Skip to content

Commit

Permalink
test: Added an evaluate method call to a unit test for a multi-inpu…
Browse files Browse the repository at this point in the history
…t model.
  • Loading branch information
ASolomatin committed Jul 1, 2024
1 parent 7fb73cd commit 5142ad6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/TensorFlowNET.Keras.UnitTest/MultiInputModelTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ public void LeNetModel()
var x = new NDArray[] { x1, x2 };
model.fit(x, dataset.Train.Labels, batch_size: 8, epochs: 3);

x1 = x1["0:8"];
x2 = x1;

x = new NDArray[] { x1, x2 };
var y = dataset.Train.Labels["0:8"];
(model as Engine.Model).evaluate(x, y);

x1 = np.ones((1, 28, 28, 1), TF_DataType.TF_FLOAT);
x2 = np.zeros((1, 28, 28, 1), TF_DataType.TF_FLOAT);
var pred = model.predict((x1, x2));
Expand Down

0 comments on commit 5142ad6

Please sign in to comment.