Skip to content

Commit affaa77

Browse files
committed
Merge branch 'master' of github.com:fchollet/keras
2 parents 70da22c + f1df887 commit affaa77

File tree

4 files changed

+28
-17
lines changed

4 files changed

+28
-17
lines changed

docs/autogen.py

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
- Getting started
99
Getting started with the sequential model
1010
Getting started with the functional api
11-
Examples
1211
FAQ
13-
Installation guide
1412
1513
- Models
1614
About Keras models
@@ -26,31 +24,39 @@
2624
explain common layer functions: get_weights, set_weights, get_config
2725
explain input_shape
2826
explain usage on non-Keras tensors
29-
Core layers
30-
Convolutional
31-
Recurrent
32-
Embeddings
33-
Normalization
34-
Advanced activations
35-
Noise
27+
Core Layers
28+
Convolutional Layers
29+
Pooling Layers
30+
Locally-connected Layers
31+
Recurrent Layers
32+
Embedding Layers
33+
Merge Layers
34+
Advanced Activations Layers
35+
Normalization Layers
36+
Noise Layers
37+
Layer Wrappers
38+
Writing your own Keras layers
3639
3740
- Preprocessing
38-
Image preprocessing
39-
Text preprocessing
40-
Sequence preprocessing
41+
Sequence Preprocessing
42+
Text Preprocessing
43+
Image Preprocessing
4144
4245
Losses
4346
Metrics
4447
Optimizers
4548
Activations
4649
Callbacks
4750
Datasets
51+
Applications
4852
Backend
49-
Initializations
53+
Initializers
5054
Regularizers
5155
Constraints
5256
Visualization
5357
Scikit-learn API
58+
Utils
59+
Contributing
5460
5561
'''
5662
from __future__ import print_function
@@ -509,3 +515,5 @@ def process_function_docstring(docstring):
509515
if not os.path.exists(subdir):
510516
os.makedirs(subdir)
511517
open(path, 'w').write(mkdown)
518+
519+
shutil.copyfile('../CONTRIBUTING.md', 'sources/contributing.md')

docs/mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,4 @@ pages:
5151
- Visualization: visualization.md
5252
- Scikit-learn API: scikit-learn-api.md
5353
- Utils: utils.md
54+
- Contributing: contributing.md

keras/callbacks.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
import os
55
import csv
6+
import six
67

78
import numpy as np
89
import time
@@ -861,16 +862,17 @@ def __init__(self, filename, separator=',', append=False):
861862
self.writer = None
862863
self.keys = None
863864
self.append_header = True
865+
self.file_flags = 'b' if six.PY2 and os.name == 'nt' else ''
864866
super(CSVLogger, self).__init__()
865867

866868
def on_train_begin(self, logs=None):
867869
if self.append:
868870
if os.path.exists(self.filename):
869-
with open(self.filename) as f:
871+
with open(self.filename, 'r' + self.file_flags) as f:
870872
self.append_header = not bool(len(f.readline()))
871-
self.csv_file = open(self.filename, 'a')
873+
self.csv_file = open(self.filename, 'a' + self.file_flags)
872874
else:
873-
self.csv_file = open(self.filename, 'w')
875+
self.csv_file = open(self.filename, 'w' + self.file_flags)
874876

875877
def on_epoch_end(self, epoch, logs=None):
876878
logs = logs or {}

keras/engine/training.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1370,7 +1370,7 @@ def fit(self, x=None,
13701370
batch_size: integer. Number of samples per gradient update.
13711371
epochs: integer, the number of times to iterate
13721372
over the training data arrays.
1373-
verbose: 0, 1, or 2. Verbosity mode.
1373+
verbose: 0, 1, or 2. Verbosity mode.
13741374
0 = silent, 1 = verbose, 2 = one log line per epoch.
13751375
callbacks: list of callbacks to be called during training.
13761376
See [callbacks](/callbacks).

0 commit comments

Comments
 (0)