wmlp

Classes

WMLP

Multi-Layer Perceptron with 2 hidden layers (100 neurons each).

Module Contents

class wmlp.WMLP(input_dim, output_dim, hidden_dim=100, negative_slope=0.01)

Bases: torch.nn.Module

Multi-Layer Perceptron with 2 hidden layers (100 neurons each).

Args:

input_dim (int): Dimension of input features output_dim (int): Dimension of output hidden_dim (int): Number of neurons in each hidden layer (default: 100) negative_slope (float): Controls the angle of the negative slope for LeakyReLU (default: 0.01)

fc1
fc2
fc3
activation
forward(x)
Args:

x (torch.Tensor): Input tensor of shape (batch_size, input_dim)

Returns:

torch.Tensor: Output tensor of shape (batch_size, output_dim)