# tf.keras.utils.get_source_inputs

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/keras-team/keras/tree/v2.14.0/keras/utils/layer_utils.py#L33-L69) |

Returns the list of input tensors necessary to compute `tensor`.

    tf.keras.utils.get_source_inputs(
        tensor, layer=None, node_index=None
    )

Output will always be a list of tensors
(potentially with 1 element).

<br />

<br />

<br />

| ## Args ||
|---|---|
| `tensor` | The tensor to start from. |
| `layer` | Origin layer of the tensor. Will be determined via tensor._keras_history if not provided. |
| `node_index` | Origin node index of the tensor. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| List of input tensors. ||

<br />