# layer

````
    description: 'layer layer for configurable component'
    ---

    # layer layer

    `layer` allows you to reference any layer defined in the rest of the network.

    ## arguments

        `layer_name` - The name of the layer to use

    ## Optional arguments

        `upsample` - If true, upsample the layer to the current size

    ## input size

    Any 4-d tensor

    ## output size

    if upsample true, the current input size
    otherwise the layer size

    ## syntax

    ```json
      "layer z"
    ```

    ## examples

    ```json

      "identity name=encoding",
      ...
      "add self (layer encoding upsample=true)"
    ```
````


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hypergan.gitbook.io/hypergan/components/layers/layer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
