Merge pull request from lutzroeder:master

PiperOrigin-RevId: 317328682
Change-Id: If545e48979d2d7be8974d531675b44a7c74b58bd
This commit is contained in:
TensorFlower Gardener 2020-06-19 10:15:12 -07:00
commit af5b7537d1
2 changed files with 11 additions and 6 deletions
tensorflow/python/keras/layers

View File

@ -825,10 +825,14 @@ class Lambda(Layer):
returned as output mask regardless of what the input is. returned as output mask regardless of what the input is.
arguments: Optional dictionary of keyword arguments to be passed to the arguments: Optional dictionary of keyword arguments to be passed to the
function. function.
Input shape: Arbitrary. Use the keyword argument input_shape (tuple of
Input shape:
Arbitrary. Use the keyword argument input_shape (tuple of
integers, does not include the samples axis) when using this layer as the integers, does not include the samples axis) when using this layer as the
first layer in a model. first layer in a model.
Output shape: Specified by `output_shape` argument
Output shape:
Specified by `output_shape` argument
""" """
@trackable.no_automatic_dependency_tracking @trackable.no_automatic_dependency_tracking

View File

@ -341,10 +341,11 @@ class Bidirectional(Wrapper):
combined. One of {'sum', 'mul', 'concat', 'ave', None}. If None, the combined. One of {'sum', 'mul', 'concat', 'ave', None}. If None, the
outputs will not be combined, they will be returned as a list. Default outputs will not be combined, they will be returned as a list. Default
value is 'concat'. value is 'concat'.
backward_layer: Optional `keras.layers.RNN`, or keras.layers.Layer` instance backward_layer: Optional `keras.layers.RNN`, or `keras.layers.Layer`
to be used to handle backwards input processing. If `backward_layer` is instance to be used to handle backwards input processing.
not provided, the layer instance passed as the `layer` argument will be If `backward_layer` is not provided, the layer instance passed as the
used to generate the backward layer automatically. `layer` argument will be used to generate the backward layer
automatically.
Note that the provided `backward_layer` layer should have properties Note that the provided `backward_layer` layer should have properties
matching those of the `layer` argument, in particular it should have the matching those of the `layer` argument, in particular it should have the
same values for `stateful`, `return_states`, `return_sequence`, etc. same values for `stateful`, `return_states`, `return_sequence`, etc.