The output of each layer/function is provided as the input to the next.
The inputs passed to __call__ are passed to the inputs of the first
Layer, and it returns the outputs of the last Layer.
Args
layers_funcs
An optional sequence where each element is either a
tf.compat.v1.layers.Layer object or a callable.
name
An optional string name to use for this Network.
Args
name
The name to use for this Network. If specified, it must be unique
in the context where this Network is first (1) added to another
Network (in which case it must not share a name with other Layers
added to that Network), or (2) built/called (in which case no other
'top-level' Networks may share this name). If unspecified or None, the
Network will be named using its class name, with a number appended if
necessary for uniqueness (e.g. MyNetwork -> 'my_network_1').
Raises
ValueError
If name is not valid. Note that some naming errors will
instead be raised when the Network is called.
String matching one of the names of a contained Layer. Note that
the names of Layers added to Networks may not be unique when doing
layer sharing (i.e. adding a Layer to this Network which was already
added to another Network). The lowest index Layer with a matching
name will be returned.
index
Integer in [0, number of layers). Layers are assigned an index by
the order they are added.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.contrib.eager.Sequential\n\n\u003cbr /\u003e\n\n|-------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/eager/python/network.py#L531-L575) |\n\nRepresents a linear sequence of Layers or functions.\n\nInherits From: [`Network`](../../../tf/contrib/eager/Network) \n\n tf.contrib.eager.Sequential(\n layers_funcs=None, name=None\n )\n\nThe output of each layer/function is provided as the input to the next.\nThe inputs passed to `__call__` are passed to the inputs of the first\nLayer, and it returns the outputs of the last Layer.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|----------------|-----------------------------------------------------------------------------------------------------|\n| `layers_funcs` | An optional sequence where each element is either a tf.compat.v1.layers.Layer object or a callable. |\n| `name` | An optional string name to use for this Network. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | The name to use for this `Network`. If specified, it must be unique in the context where this `Network` is first (1) added to another `Network` (in which case it must not share a name with other `Layers` added to that `Network`), or (2) built/called (in which case no other 'top-level' `Network`s may share this name). If unspecified or None, the `Network` will be named using its class name, with a number appended if necessary for uniqueness (e.g. MyNetwork -\\\u003e 'my_network_1'). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|--------------|-----------------------------------------------------------------------------------------------------------|\n| `ValueError` | If `name` is not valid. Note that some naming errors will instead be raised when the `Network` is called. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ---------- ||\n|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `graph` | DEPRECATED FUNCTION \u003cbr /\u003e | **Warning:** THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Stop using this property because tf.layers layers no longer track their graph. |\n| `layers` | \u003cbr /\u003e |\n| `scope_name` | \u003cbr /\u003e \u003cbr /\u003e |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `add`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/eager/python/network.py#L551-L561) \n\n add(\n layer_func\n )\n\n### `get_layer`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/eager/python/network.py#L413-L447) \n\n get_layer(\n name=None, index=None\n )\n\nGet a contained [`tf.compat.v1.layers.Layer`](../../../tf/layers/Layer) either by name or index.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | String matching one of the names of a contained `Layer`. Note that the names of `Layer`s added to `Network`s may not be unique when doing layer sharing (i.e. adding a `Layer` to this `Network` which was already added to another `Network`). The lowest index `Layer` with a matching name will be returned. |\n| `index` | Integer in \\[0, number of layers). Layers are assigned an index by the order they are added. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|---|---|\n| A [`tf.compat.v1.layers.Layer`](../../../tf/layers/Layer) object. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ||\n|--------------|-----------------------------------------------------------------------------|\n| `ValueError` | If neither or both of 'index' or 'name' is specified, or the lookup failed. |\n\n\u003cbr /\u003e\n\n### `track_layer`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/eager/python/network.py#L350-L411) \n\n track_layer(\n layer\n )\n\nTrack a Layer in this Network.\n\n`Network` requires that all `Layer`s used in `call()` be tracked so that the\n`Network` can export a complete list of variables.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|---------|-------------------------------------------------------------------|\n| `layer` | A [`tf.compat.v1.layers.Layer`](../../../tf/layers/Layer) object. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|---|---|\n| The passed in `layer`. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ||\n|----------------|---------------------------------------------------------|\n| `RuntimeError` | If **init** has not been called. |\n| `TypeError` | If `layer` is the wrong type. |\n| `ValueError` | If a `Layer` with the same name has already been added. |\n\n\u003cbr /\u003e"]]