Skip to content

Commit 34f757f

Browse files
committed
windows works
1 parent a070e2e commit 34f757f

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

imdb.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ def vectorize_sequences(sequences, dimension=10000):
3939

4040
model = models.Sequential()
4141
model.add(layers.Dense(16, activation='relu', input_shape=(10000,)))
42+
model.add(layers.Dropout(0.3))
4243
model.add(layers.Dense(16, activation='relu'))
44+
model.add(layers.Dropout(0.3))
4345
model.add(layers.Dense(1, activation='sigmoid'))
4446

4547
model.compile(optimizer='rmsprop',
@@ -52,9 +54,11 @@ def vectorize_sequences(sequences, dimension=10000):
5254
y_val = y_train[:10000]
5355
partial_y_train = y_train[10000:]
5456

57+
model.summary()
58+
5559
history = model.fit(partial_x_train,
5660
partial_y_train,
57-
epochs=4,
61+
epochs=5,
5862
batch_size=512,
5963
validation_data=(x_val, y_val))
6064

notes.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ alias py="python3"
44

55
py -m venv venv
66

7-
source venv/bin/activate
7+
source venv/bin/activate (mac)
8+
venv/Scripts/activate.bat (PC)
89

910
pip install -r requirements.txt
1011

11-
jupyter notebook
12+
jupyter notebook
1213

1314
jupyter lab

0 commit comments

Comments
 (0)