It is also possible to define Keras layers which have multiple input tensors and multiple output tensors. To do this, you should assume that the inputs and outputs of the methods build(input_shape), call(x) and compute_output_shape(input_shape) are lists. Here is an example, similar to the one above: