Module ml4opf.models.ldf_nn.acopf_ldf_nn

Classes

class ACLDFNN (opfmodel: OPFModel,
slices: list[slice],
optimizer: str = 'adam',
loss: str = 'mse',
hidden_sizes: list[int] = [100, 100],
activation: str = 'relu',
boundrepair: str = 'none',
learning_rate: float = 0.001,
step_size: float = 1e-05,
kickin: int = 0,
update_freq: int = 500,
divide_by_counter: bool = True,
exclude_keys: list[str] = [],
weight_init_seed: int = 42)

Base class for LDF containing formulation-agnostic methods.

Ancestors

  • LDFNN
  • ACBasicNN
  • BasicNN
  • pytorch_lightning.core.module.LightningModule
  • lightning_fabric.utilities.device_dtype_mixin._DeviceDtypeModuleMixin
  • pytorch_lightning.core.mixins.hparams_mixin.HyperparametersMixin
  • pytorch_lightning.core.hooks.ModelHooks
  • pytorch_lightning.core.hooks.DataHooks
  • pytorch_lightning.core.hooks.CheckpointHooks
  • torch.nn.modules.module.Module

Class variables

var opfmodelACModel
var violationACViolation

Inherited members

class ACLDFNeuralNet (config: dict,
problem: OPFProblem)

A basic feed-forward neural network.

Args

config : dict
Dictionary containing the model configuration.

optimizer (str): Optimizer. Supported: "adam", "adamw", "sgd".

loss (str): Loss function. Supported: "mse", "l1".

hidden_sizes (list[int]): List of hidden layer sizes.

activation (str): Activation function. Supported: "relu", "tanh", "sigmoid".

boundrepair (str): Bound clipping method. Supported: "none", "relu", "clamp", "sigmoid".

learning_rate (float): Learning rate.

problem : OPFProblem
The OPFProblem object.

Ancestors

Class variables

var modelACLDFNN

Inherited members