File tree 2 files changed +11
-3
lines changed
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ RUN apt-get install -y libfreetype6-dev && \
80
80
pip install xgboost && \
81
81
# Pinned to match GPU version. Update version together.
82
82
pip install lightgbm==3.1.1 && \
83
+ pip install pydot && \
83
84
pip install keras && \
84
85
pip install keras-tuner && \
85
86
pip install flake8 && \
Original file line number Diff line number Diff line change 1
1
import unittest
2
+ import os .path
2
3
3
4
import numpy as np
4
5
import tensorflow as tf
@@ -37,8 +38,13 @@ def test_tf_keras(self):
37
38
metrics = ['accuracy' ])
38
39
39
40
model .fit (x_train , y_train , epochs = 1 )
40
- model .evaluate (x_test , y_test )
41
-
41
+
42
+ result = model .evaluate (x_test , y_test )
43
+ self .assertEqual (2 , len (result ))
44
+
45
+ # exercices pydot path.
46
+ tf .keras .utils .plot_model (model , to_file = "tf_plot_model.png" )
47
+ self .assertTrue (os .path .isfile ("tf_plot_model.png" ))
42
48
43
49
def test_lstm (self ):
44
50
x_train = np .random .random ((100 , 28 , 28 ))
@@ -58,7 +64,8 @@ def test_lstm(self):
58
64
metrics = ['accuracy' ])
59
65
60
66
model .fit (x_train , y_train , epochs = 1 )
61
- model .evaluate (x_test , y_test )
67
+ result = model .evaluate (x_test , y_test )
68
+ self .assertEqual (2 , len (result ))
62
69
63
70
@gpu_test
64
71
def test_gpu (self ):
You can’t perform that action at this time.
0 commit comments