Module
Module(
inputs, output = None, dependencies = None, name = 'module'
)
Module Layer
Creates a single Layer object from an existing graph defined between a set of inputs and a single output layer.
The resulting object can be reused with other inputs just like any other Layer.
Note
The difference between a Module and a Graph is that a Module has a single output, and can be used as a
Layer. A layer graph is a utility to group multiple layers into a single function —possibly with
multiple outputs.
Raises
- ValueError : is raised if an input layer does not connect to the output. A
Moduleneeds to be a self-contained layer graph.
Args
- inputs (
LayerorList[Layer]) : one or more input layers - output (
LayerorNone) : output layer; if no inputs are passed, it follows the graph backwards from the output
Methods:
.compute_shape
.compute_shape()
.init_state
.init_state()
.compute
.compute(
*input_tensors
)
.reuse_with
.reuse_with(
*inputs, name = None
)
source