otx.algorithms.visual_prompting.adapters.pytorch_lightning.models.utils.layer_norm#

Layer normalization module.

Classes

LayerNorm2d(num_channels[, eps])

LayerNorm2d module.

class otx.algorithms.visual_prompting.adapters.pytorch_lightning.models.utils.layer_norm.LayerNorm2d(num_channels: int, eps: float = 1e-06)[source]#

Bases: Module

LayerNorm2d module.

Reference: facebookresearch/segment-anything

Parameters:
  • num_channels (int) – Number of channels.

  • eps (float) – Epsilon value.

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(x: Tensor) Tensor[source]#

Forward function of LayerNorm2d.

Parameters:

x (Tensor) – Input tensor.

Returns:

Output tensor.

Return type:

Tensor