> For the complete documentation index, see [llms.txt](https://deeplearning4j.konduit.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://deeplearning4j.konduit.ai/en-1.0.0-rewrite/model-import/overview-1/layers-noise.md).

# Noise Layers

### Keras Noise Layer Import

Noise layers add stochastic regularization during training. Support is implemented in the [layers/noise](https://github.com/eclipse/deeplearning4j/tree/master/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/noise) package.

#### Support Summary

| Keras Layer     | DL4J Equivalent                | Supported |
| --------------- | ------------------------------ | --------- |
| GaussianNoise   | DropoutLayer (GaussianNoise)   | Yes       |
| GaussianDropout | DropoutLayer (GaussianDropout) | Yes       |
| AlphaDropout    | DropoutLayer (AlphaDropout)    | Yes       |

***

### KerasGaussianNoise

[source](https://github.com/eclipse/deeplearning4j/blob/master/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/noise/KerasGaussianNoise.java)

Imports a Keras `GaussianNoise` layer as a DL4J `DropoutLayer` with `GaussianNoise` applied to the activations during training. The standard deviation `stddev` is read from the Keras configuration.

```
output = input + N(0, stddev)  during training
output = input                 during inference
```

#### Constructor

```java
public KerasGaussianNoise(Integer kerasVersion) throws UnsupportedKerasConfigurationException
```

#### getGaussianNoiseLayer

```java
public DropoutLayer getGaussianNoiseLayer()
```

Returns the DL4J `DropoutLayer` configured with Gaussian noise.

#### getOutputType

```java
public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException
```

***

### KerasGaussianDropout

[source](https://github.com/eclipse/deeplearning4j/blob/master/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/noise/KerasGaussianDropout.java)

Imports a Keras `GaussianDropout` layer as a DL4J `DropoutLayer` with `GaussianDropout`. This multiplies activations by a Gaussian noise factor with mean 1 and variance derived from the dropout rate `rate`:

```
stddev = sqrt(rate / (1 - rate))
output = input * N(1, stddev)
```

#### Constructor

```java
public KerasGaussianDropout(Integer kerasVersion) throws UnsupportedKerasConfigurationException
```

#### getGaussianDropoutLayer

```java
public DropoutLayer getGaussianDropoutLayer()
```

Returns the DL4J `DropoutLayer` configured with Gaussian dropout.

#### getOutputType

```java
public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException
```

***

### KerasAlphaDropout

[source](https://github.com/eclipse/deeplearning4j/blob/master/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/noise/KerasAlphaDropout.java)

Imports a Keras `AlphaDropout` layer as a DL4J `DropoutLayer` with `AlphaDropout`. AlphaDropout is designed for use with SELU activations; it preserves the mean and variance of activations after applying dropout by setting dropped-out units to the negative saturation value of SELU.

#### Constructor

```java
public KerasAlphaDropout(Integer kerasVersion) throws UnsupportedKerasConfigurationException
```

#### getAlphaDropoutLayer

```java
public DropoutLayer getAlphaDropoutLayer()
```

Returns the DL4J `DropoutLayer` configured with AlphaDropout.

#### getOutputType

```java
public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException
```

***

### Notes

* All noise layers are applied only during training. At inference time they are identity functions. DL4J handles this through the `LayerWorkspaceMgr` training/test mode flag.
* `AlphaDropout` is intended to be used with `SELU` activations and the `lecun_normal` initializer. If your Keras model used this combination, verify that the DL4J model is also initialized with `lecun_normal` (which it will be if weights are loaded from HDF5).
* Noise layers have no trainable parameters; `setWeights` is a no-op for these classes.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://deeplearning4j.konduit.ai/en-1.0.0-rewrite/model-import/overview-1/layers-noise.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.
