Skip to content

Commit 5142ad6

Browse files
committed
test: Added an evaluate method call to a unit test for a multi-input model.
1 parent 7fb73cd commit 5142ad6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/TensorFlowNET.Keras.UnitTest/MultiInputModelTest.cs

+7
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ public void LeNetModel()
5454
var x = new NDArray[] { x1, x2 };
5555
model.fit(x, dataset.Train.Labels, batch_size: 8, epochs: 3);
5656

57+
x1 = x1["0:8"];
58+
x2 = x1;
59+
60+
x = new NDArray[] { x1, x2 };
61+
var y = dataset.Train.Labels["0:8"];
62+
(model as Engine.Model).evaluate(x, y);
63+
5764
x1 = np.ones((1, 28, 28, 1), TF_DataType.TF_FLOAT);
5865
x2 = np.zeros((1, 28, 28, 1), TF_DataType.TF_FLOAT);
5966
var pred = model.predict((x1, x2));

0 commit comments

Comments
 (0)