Spaces:
Runtime error
Runtime error
Commit
·
0127ced
1
Parent(s):
a987b89
Update main.py
Browse files
main.py
CHANGED
|
@@ -34,14 +34,14 @@ def preprocess():
|
|
| 34 |
x_test = np.expand_dims(x_test, -1)
|
| 35 |
|
| 36 |
num_classes = 10
|
| 37 |
-
|
| 38 |
-
|
| 39 |
y_train = keras.utils.to_categorical(y_train, num_classes)
|
| 40 |
y_test = keras.utils.to_categorical(y_test, num_classes)
|
| 41 |
|
| 42 |
return x_train, y_train, x_test, y_test
|
| 43 |
|
| 44 |
def train():
|
|
|
|
| 45 |
x_train, y_train, x_test, y_test = preprocess()
|
| 46 |
|
| 47 |
model = keras.Sequential(
|
|
|
|
| 34 |
x_test = np.expand_dims(x_test, -1)
|
| 35 |
|
| 36 |
num_classes = 10
|
| 37 |
+
|
|
|
|
| 38 |
y_train = keras.utils.to_categorical(y_train, num_classes)
|
| 39 |
y_test = keras.utils.to_categorical(y_test, num_classes)
|
| 40 |
|
| 41 |
return x_train, y_train, x_test, y_test
|
| 42 |
|
| 43 |
def train():
|
| 44 |
+
input_shape = (28, 28, 1)
|
| 45 |
x_train, y_train, x_test, y_test = preprocess()
|
| 46 |
|
| 47 |
model = keras.Sequential(
|