You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge branch 'master' of github.com:fchollet/keras into pr_7508
* 'master' of github.com:fchollet/keras: (57 commits)
Minor README edit
Speed up Travis tests (keras-team#9386)
fix typo (keras-team#9391)
Fix style issue in docstring
Prepare 2.1.4 release.
Fix activity regularizer + model composition test
Corrected copyright years (keras-team#9375)
Change default interpolation from nearest to bilinear. (keras-team#8849)
a capsule cnn on cifar-10 (keras-team#9193)
Enable us to use sklearn to do cv for functional api (keras-team#9320)
Add support for stateful metrics. (keras-team#9253)
The type of list keys was float (keras-team#9324)
Fix mnist sklearn wrapper example (keras-team#9317)
keras-team#9287 Fix most of the file-handle resource leaks. (keras-team#9309)
Pass current learning rate to schedule() in LearningRateScheduler (keras-team#8865)
Simplify with from six.moves import input (keras-team#9216)
fixed RemoteMonitor: Json to handle np.float32 and np.int32 types (keras-team#9261)
Update tweet length from 140 to 280 in docs
Add `depthconv_conv2d` tests (keras-team#9225)
Remove `force` option in progbar
...
Copy file name to clipboardExpand all lines: README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -155,7 +155,7 @@ sudo python setup.py install
155
155
------------------
156
156
157
157
158
-
## Switching from TensorFlow to CNTK or Theano
158
+
## Using a different backend than TensorFlow
159
159
160
160
By default, Keras will use TensorFlow as its tensor manipulation library. [Follow these instructions](https://keras.io/backend/) to configure the Keras backend.
Copy file name to clipboardExpand all lines: docs/templates/getting-started/functional-api-guide.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -168,15 +168,15 @@ One way to achieve this is to build a model that encodes two tweets into two vec
168
168
169
169
Because the problem is symmetric, the mechanism that encodes the first tweet should be reused (weights and all) to encode the second tweet. Here we use a shared LSTM layer to encode the tweets.
170
170
171
-
Let's build this with the functional API. We will take as input for a tweet a binary matrix of shape `(140, 256)`, i.e. a sequence of 140 vectors of size 256, where each dimension in the 256-dimensional vector encodes the presence/absence of a character (out of an alphabet of 256 frequent characters).
171
+
Let's build this with the functional API. We will take as input for a tweet a binary matrix of shape `(280, 256)`, i.e. a sequence of 280 vectors of size 256, where each dimension in the 256-dimensional vector encodes the presence/absence of a character (out of an alphabet of 256 frequent characters).
172
172
173
173
```python
174
174
import keras
175
175
from keras.layers import Input, LSTM, Dense
176
176
from keras.models import Model
177
177
178
-
tweet_a = Input(shape=(140, 256))
179
-
tweet_b = Input(shape=(140, 256))
178
+
tweet_a = Input(shape=(280, 256))
179
+
tweet_b = Input(shape=(280, 256))
180
180
```
181
181
182
182
To share a layer across different inputs, simply instantiate the layer once, then call it on as many inputs as you want:
@@ -222,7 +222,7 @@ In previous versions of Keras, you could obtain the output tensor of a layer ins
222
222
As long as a layer is only connected to one input, there is no confusion, and `.output` will return the one output of the layer:
Copy file name to clipboardExpand all lines: docs/templates/preprocessing/image.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -82,15 +82,15 @@ Generate batches of tensor image data with real-time data augmentation. The data
82
82
- __batch_size__: int (default: 32).
83
83
- __shuffle__: boolean (default: True).
84
84
- __seed__: int (default: None).
85
-
- __save_to_dir__: None or str (default: None). This allows you to optimally specify a directory to which to save the augmented pictures being generated (useful for visualizing what you are doing).
85
+
- __save_to_dir__: None or str (default: None). This allows you to optionally specify a directory to which to save the augmented pictures being generated (useful for visualizing what you are doing).
86
86
- __save_prefix__: str (default: `''`). Prefix to use for filenames of saved pictures (only relevant if `save_to_dir` is set).
87
87
- __save_format__: one of "png", "jpeg" (only relevant if `save_to_dir` is set). Default: "png".
88
88
-__yields__: Tuples of `(x, y)` where `x` is a numpy array of image data and `y` is a numpy array of corresponding labels.
89
89
The generator loops indefinitely.
90
90
-__flow_from_directory(directory)__: Takes the path to a directory, and generates batches of augmented/normalized data. Yields batches indefinitely, in an infinite loop.
91
91
-__Arguments__:
92
92
- __directory__: path to the target directory. It should contain one subdirectory per class.
93
-
Any PNG, JPG, BMPor PPM images inside each of the subdirectories directory tree will be included in the generator.
93
+
Any PNG, JPG, BMP, PPM or TIF images inside each of the subdirectories directory tree will be included in the generator.
94
94
See [this script](https://gist.github.com/fchollet/0830affa1f7f19fd47b06d4cf89ed44d) for more details.
95
95
- __target_size__: tuple of integers `(height, width)`, default: `(256, 256)`.
96
96
The dimensions to which all images found will be resized.
@@ -100,7 +100,7 @@ Generate batches of tensor image data with real-time data augmentation. The data
100
100
- __batch_size__: size of the batches of data (default: 32).
101
101
- __shuffle__: whether to shuffle the data (default: True)
102
102
- __seed__: optional random seed for shuffling and transformations.
103
-
- __save_to_dir__: None or str (default: None). This allows you to optimally specify a directory to which to save the augmented pictures being generated (useful for visualizing what you are doing).
103
+
- __save_to_dir__: None or str (default: None). This allows you to optionally specify a directory to which to save the augmented pictures being generated (useful for visualizing what you are doing).
104
104
- __save_prefix__: str. Prefix to use for filenames of saved pictures (only relevant if `save_to_dir` is set).
105
105
- __save_format__: one of "png", "jpeg" (only relevant if `save_to_dir` is set). Default: "png".
106
106
- __follow_links__: whether to follow symlinks inside class subdirectories (default: False).
Class for vectorizing texts, or/and turning texts into sequences (=list of word indexes, where the word of rank i in the dataset (starting at 1) has index i).
88
89
89
90
-__Arguments__: Same as `text_to_word_sequence` above.
90
91
-__num_words__: None or int. Maximum number of words to work with (if set, tokenization will be restricted to the top num_words most common words in the dataset).
91
92
-__char_level__: if True, every character will be treated as a token.
93
+
-__oov_token__: None or str. If given, it will be added to word_index and used to replace out-of-vocabulary words during text_to_sequence calls.
Copy file name to clipboardExpand all lines: docs/templates/why-use-keras.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ Your Keras models can be easily deployed across a greater range of platforms tha
34
34
- On Android, via the TensorFlow Android runtime. Example: [Not Hotdog app](https://medium.com/@timanglade/how-hbos-silicon-valley-built-not-hotdog-with-mobile-tensorflow-keras-react-native-ef03260747f3)
35
35
- In the browser, via GPU-accelerated JavaScript runtimes such as [Keras.js](https://transcranial.github.io/keras-js/#/) and [WebDNN](https://mil-tokyo.github.io/webdnn/)
36
36
- On Google Cloud, via [TensorFlow-Serving](https://www.tensorflow.org/serving/)
37
-
- In a Python webapp backend (such as a Flask app)
37
+
-[In a Python webapp backend (such as a Flask app)](https://blog.keras.io/building-a-simple-keras-deep-learning-rest-api.html)
38
38
- On the JVM, via [DL4J model import provided by SkyMind](https://deeplearning4j.org/model-import-keras)
39
39
- On Raspberry Pi
40
40
@@ -54,7 +54,7 @@ As such, your Keras model can be trained on a number of different hardware platf
0 commit comments