Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.

Commit

Permalink
Reduce scope and improve reproducibility
Browse files Browse the repository at this point in the history
  • Loading branch information
nsorros committed Feb 25, 2021
1 parent 3c7df33 commit de06928
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_cnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,11 @@ def test_XY_dataset():
X_vec = vec.fit_transform(X)

data = tf.data.Dataset.from_tensor_slices((X_vec, Y))
data = data.shuffle(100)
data = data.shuffle(100, seed=42)
clf = CNNClassifier(batch_size=2)

clf.fit(data)
assert clf.score(data, Y) > 0.6
assert clf.score(data, Y) > 0.3


def test_XY_dataset_sparse_y():
Expand All @@ -268,7 +268,7 @@ def test_XY_dataset_sparse_y():
X_vec = vec.fit_transform(X)

data = tf.data.Dataset.from_tensor_slices((X_vec, Y))
data = data.shuffle(100)
data = data.shuffle(100, seed=42)
clf = CNNClassifier(
batch_size=2, sparse_y=True, multilabel=True
)
Expand Down

0 comments on commit de06928

Please sign in to comment.