diff options
Diffstat (limited to 'dlstuff')
-rwxr-xr-x | dlstuff/four.py | 3 | ||||
-rwxr-xr-x | dlstuff/two.py | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/dlstuff/four.py b/dlstuff/four.py index 983386a..90f58b9 100755 --- a/dlstuff/four.py +++ b/dlstuff/four.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!python # _*_ coding=utf-8 _*_ import argparse @@ -48,6 +48,7 @@ def premain(argparser): signal.signal(signal.SIGINT, SigHandler_SIGINT) #here (train_data, train_targets), (test_data, test_targets) = boston_housing.load_data() + print(type(train_data)) mean = train_data.mean(axis=0) train_data -= mean std = train_data.std(axis=0) diff --git a/dlstuff/two.py b/dlstuff/two.py index 8287708..1d4a614 100755 --- a/dlstuff/two.py +++ b/dlstuff/two.py @@ -66,14 +66,12 @@ def premain(argparser): x_test = vectorize_sequences(test_data) y_train = np.asarray(train_labels).astype("float32") y_test = np.asarray(test_labels).astype("float32") - model = models.Sequential() model.add(layers.Dense(16, kernel_regularizer=regularizers.l2(0.001), activation="relu", input_shape=(10000,))) model.add(layers.Dropout(0.5)) model.add(layers.Dense(16, kernel_regularizer=regularizers.l2(0.001), activation="relu")) model.add(layers.Dropout(0.5)) model.add(layers.Dense(1, activation="sigmoid")) - x_val = x_train[:10000] partial_x_train = x_train[10000:] y_val = y_train[:10000] |