Skip to content

Commit 4094ddf

Browse files
author
Akshay Rajeev
committed
made 2500 samples limit from data
1 parent 45b91e5 commit 4094ddf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

eval.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def main():
8484

8585
VAE_input = convert_to_size(56, 48, x_test)
8686

87-
input_data = VAEModel.predict(VAE_input).astype("float32")
87+
input_data = VAEModel.predict(VAE_input[:2500]).astype("float32")
8888

8989
print("VAE model predictions made...")
9090

@@ -95,7 +95,7 @@ def main():
9595
print(clean_label_p)
9696
# clean_label_p = np.argmax(bd_model.predict(x_test), axis=1)
9797
print("Poisoned detections:", np.count_nonzero(clean_label_p == 1283))
98-
class_accuracy = np.mean(np.equal(clean_label_p, y_test)) * 100
98+
class_accuracy = np.mean(np.equal(clean_label_p, y_test[:2500])) * 100
9999

100100
print('Classification accuracy:', class_accuracy)
101101

0 commit comments

Comments
 (0)