DAPPER (Document Analysis, Processing, and Pattern Extraction Repository)
Statistical Learning Final Project for Document Classification
 
Loading...
Searching...
No Matches
lsnet.LSBlock Class Reference

LS Block for LSNet architecture. More...

Inheritance diagram for lsnet.LSBlock:
Inheritance graph
Collaboration diagram for lsnet.LSBlock:
Collaboration graph

Public Member Functions

 __init__ (self, in_channels, out_channels, stride=1)
 Constructor for LSBlock.
 
 forward (self, x)
 Forward pass through the LS Block.
 

Public Attributes

 conv
 
 shortcut
 

Detailed Description

LS Block for LSNet architecture.

This block consists of LS Convolution followed by a residual connection, forming a basic building block for the LSNet architecture.

LS Block as described in the LSNet paper.

This block consists of LS Convolution followed by a residual connection.

Constructor & Destructor Documentation

◆ __init__()

lsnet.LSBlock.__init__ (   self,
  in_channels,
  out_channels,
  stride = 1 
)

Constructor for LSBlock.

Parameters
in_channelsNumber of input channels
out_channelsNumber of output channels
strideStride of the convolution
Initialize the LS Block.

Args:
    in_channels: Number of input channels
    out_channels: Number of output channels
    stride: Stride of the convolution (default: 1)

Member Function Documentation

◆ forward()

lsnet.LSBlock.forward (   self,
  x 
)

Forward pass through the LS Block.

Parameters
xInput tensor of shape [batch_size, in_channels, height, width]
Returns
Output tensor of shape [batch_size, out_channels, height, width]
Forward pass through the LS Block.

Args_:
    x: Input tensor of shape [batch_size, in_channels, height, width]
    
Returns:
    Output tensor of shape [batch_size, out_channels, height, width]

Member Data Documentation

◆ conv

lsnet.LSBlock.conv

◆ shortcut

lsnet.LSBlock.shortcut

The documentation for this class was generated from the following file: