diff --git a/docs/sources/backend.md b/docs/sources/backend.md index f585276b1..28ee2c335 100644 --- a/docs/sources/backend.md +++ b/docs/sources/backend.md @@ -32,7 +32,7 @@ You can import the backend module via: from keras import backend as K ``` -This instantiates an input placeholder. It's equivalent to `tf.placeholder()` or `T.matrix()`, `T.tensor3()`, etc. +The code below instantiates an input placeholder. It's equivalent to `tf.placeholder()` or `T.matrix()`, `T.tensor3()`, etc. ```python input = K.placeholder(shape=(2, 4, 5)) @@ -42,7 +42,7 @@ input = K.placeholder(shape=(None, 4, 5)) input = K.placeholder(ndim=3) ``` -This instantiates a shared variable. It's equivalent to `tf.variable()` or `theano.shared()`. +The code below instantiates a shared variable. It's equivalent to `tf.variable()` or `theano.shared()`. ```python val = np.random.random((3, 4, 5)) diff --git a/docs/sources/layers/core.md b/docs/sources/layers/core.md index 38c4c1ddd..bda8f0365 100644 --- a/docs/sources/layers/core.md +++ b/docs/sources/layers/core.md @@ -188,7 +188,7 @@ keras.layers.core.Activation(activation) Apply an activation function to the input. -- __Input shape__: Arbitrary. Use the keyword argument `input_shape` (tuple of integers, does not include the samples axis) when using this layer as the first layer in a model. +- __Input shape__: Arbitrary. Use the keyword argument `input_shape` (tuple of integers, does not include the samples axis) when using this layer as the first layer in a model. To specify the number of samples per batch, you can use the keyword argument `batch_input_shape` (tuple of integers, including the samples axis). - __Output shape__: Same as input. @@ -206,7 +206,7 @@ keras.layers.core.Dropout(p) Apply dropout to the input. Dropout consists in randomly setting a fraction `p` of input units to 0 at each update during training time, which helps prevent overfitting. Reference: [Dropout: A Simple Way to Prevent Neural Networks from Overfitting](http://www.cs.toronto.edu/~rsalakhu/papers/srivastava14a.pdf) -- __Input shape__: Arbitrary. Use the keyword argument `input_shape` (tuple of integers, does not include the samples axis) when using this layer as the first layer in a model. +- __Input shape__: Arbitrary. Use the keyword argument `input_shape` (tuple of integers, does not include the samples axis) when using this layer as the first layer in a model. To specify the number of samples per batch, you can use the keyword argument `batch_input_shape` (tuple of integers, including the samples axis). - __Output shape__: Same as input. @@ -225,7 +225,7 @@ keras.layers.core.Reshape(dims) Reshape the input to a new shape containing the same number of units. -- __Input shape__: Arbitrary. Use the keyword argument `input_shape` (tuple of integers, does not include the samples axis) when using this layer as the first layer in a model. +- __Input shape__: Arbitrary. Use the keyword argument `input_shape` (tuple of integers, does not include the samples axis) when using this layer as the first layer in a model. To specify the number of samples per batch, you can use the keyword argument `batch_input_shape` (tuple of integers, including the samples axis). - __Output shape__: `(nb_samples, dims)`. @@ -249,7 +249,7 @@ keras.layers.core.Flatten() Convert a nD input to 1D. -- __Input shape__: Arbitrary. Use the keyword argument `input_shape` (tuple of integers, does not include the samples axis) when using this layer as the first layer in a model. +- __Input shape__: Arbitrary. Use the keyword argument `input_shape` (tuple of integers, does not include the samples axis) when using this layer as the first layer in a model. To specify the number of samples per batch, you can use the keyword argument `batch_input_shape` (tuple of integers, including the samples axis). - __Output shape__: `(nb_samples, nb_input_units)`. @@ -264,7 +264,7 @@ Repeat the 1D input n times. Dimensions of input are assumed to be `(nb_samples, Note that the output is still a single tensor; `RepeatVector` does not split the data flow. -- __Input shape__: Arbitrary. Use the keyword argument `input_shape` (tuple of integers, does not include the samples axis) when using this layer as the first layer in a model. +- __Input shape__: Arbitrary. Use the keyword argument `input_shape` (tuple of integers, does not include the samples axis) when using this layer as the first layer in a model. To specify the number of samples per batch, you can use the keyword argument `batch_input_shape` (tuple of integers, including the samples axis). - __Output shape__: `(nb_samples, n, input_dims)`. @@ -279,7 +279,7 @@ keras.layers.core.Permute(dims) ``` Permute the dimensions of the input data according to the given tuple. Sometimes useful for connecting RNNs and convnets together. -- __Input shape__: Arbitrary. Use the keyword argument `input_shape` (tuple of integers, does not include the samples axis) when using this layer as the first layer in a model. +- __Input shape__: Arbitrary. Use the keyword argument `input_shape` (tuple of integers, does not include the samples axis) when using this layer as the first layer in a model. To specify the number of samples per batch, you can use the keyword argument `batch_input_shape` (tuple of integers, including the samples axis). - __Output shape__: Same as the input shape, but with the dimensions re-ordered according to the ordering specified by the tuple. diff --git a/docs/sources/layers/noise.md b/docs/sources/layers/noise.md index 03db42695..bb758a4e6 100644 --- a/docs/sources/layers/noise.md +++ b/docs/sources/layers/noise.md @@ -8,7 +8,7 @@ Apply to the input an additive zero-centred gaussian noise with standard deviati Only active at training time. -- __Input shape__: Arbitrary. Use the keyword argument `input_shape` (tuple of integers, does not include the samples axis) when using this layer as the first layer in a model. +- __Input shape__: Arbitrary. Use the keyword argument `input_shape` (tuple of integers, does not include the samples axis) when using this layer as the first layer in a model. To specify the number of samples per batch, you can use the keyword argument `batch_input_shape` (tuple of integers, including the samples axis). - __Output shape__: Same as input. @@ -26,7 +26,7 @@ Apply to the input an multiplicative one-centred gaussian noise with standard de Only active at training time. -- __Input shape__: Arbitrary. Use the keyword argument `input_shape` (tuple of integers, does not include the samples axis) when using this layer as the first layer in a model. +- __Input shape__: Arbitrary. Use the keyword argument `input_shape` (tuple of integers, does not include the samples axis) when using this layer as the first layer in a model. To specify the number of samples per batch, you can use the keyword argument `batch_input_shape` (tuple of integers, including the samples axis). - __Output shape__: Same as input. diff --git a/docs/sources/models.md b/docs/sources/models.md index 58e18a320..2a93c77b4 100644 --- a/docs/sources/models.md +++ b/docs/sources/models.md @@ -127,6 +127,7 @@ model = keras.models.Graph() - __add_input__(name, input_shape, dtype='float'): Add an input with shape dimensionality `ndim`. - __Arguments__: - __input_shape__: Integer tuple, shape of the expected input (not including the samples axis). E.g. (10,) for 10-dimensional vectors, (None, 128) for sequences (of variable length) of 128-dimensional vectors, (3, 32, 32) for 32x32 images with RGB channels. + - __batch_input_shape: Integer tuple, shape of the expected batch input (including the samples axis). - __dtype__: `float` or `int`. Type of the expected input data. - __add_output__(name, input=None, inputs=[], merge_mode='concat'): Add an output connect to `input` or `inputs`. - __Arguments__: