Skip to content

Commit fdbe843

Browse files
Irina NicolaeIrina Nicolae
authored andcommitted
Clean up some tests
1 parent 7215c2d commit fdbe843

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

art/classifiers/pytorch_unittest.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def test_layers(self):
170170
# return out
171171

172172

173-
class TestTFTextClassifier(unittest.TestCase):
173+
class TestPyTorchTextClassifier(unittest.TestCase):
174174
@classmethod
175175
def setUpClass(cls):
176176
# Load IMDB
@@ -245,7 +245,6 @@ def test_loss_gradient(self):
245245
def test_layers(self):
246246
# Get IMDB
247247
(_, _), (x_test, y_test) = self.imdb
248-
y_test = to_categorical(y_test, nb_classes=2)
249248

250249
# Test and get layers
251250
layer_names = self.classifier.layer_names
@@ -267,8 +266,7 @@ def test_layers(self):
267266

268267
def test_embedding(self):
269268
# Get IMDB
270-
(x_train, y_train), (x_test, y_test) = self.imdb
271-
y_train = to_categorical(y_train, nb_classes=2)
269+
(_, _), (x_test, y_test) = self.imdb
272270

273271
# Test to embedding
274272
x_emb = self.classifier.to_embedding(x_test)
@@ -287,10 +285,3 @@ def test_embedding(self):
287285

288286
if __name__ == '__main__':
289287
unittest.main()
290-
291-
292-
293-
294-
295-
296-

0 commit comments

Comments
 (0)