DenseLightModel

class lightautoml.ml_algo.torch_based.nn_models.DenseLightModel(n_in, n_out=1, hidden_size=[512, 750], drop_rate=0.1, act_fun=torch.nn.ReLU, noise_std=0.05, num_init_features=None, use_bn=True, use_noise=False, concat_input=True, device=torch.device, **kwargs)[source]

Bases: Module

Realisation of ‘denselight’ model.

Parameters:
  • n_in (int) – Input dim.

  • n_out (int) – Output dim.

  • hidden_size (List[int]) – List of hidden dims.

  • drop_rate (Union[float, List[float]]) – Dropout rate for each layer separately or altogether.

  • act_fun (Module) – Activation function.

  • noise_std (float) – Std of noise.

  • num_init_features (Optional[int]) – If not none add fc layer before model with certain dim.

  • use_bn (bool) – Use BatchNorm.

  • use_noise (bool) – Use noise.

  • concat_input (bool) – Concatenate input to all hidden layers.

  • device (device) – Device to compute on.

forward(x)[source]

Forward-pass.

Return type:

Tensor