class_docstr: N-BEATS block which takes a basis function as an argument.
class_docstr_tok: ["N-BEATS","block","which","takes","a","basis","function","as","an","argument","."]
code: def __init__(
      self,
      input_size: int,
      n_theta: int,
      mlp_units: list,
      basis: nn.Module,
      dropout_prob: float,
      activation: str,
  ):
      """ """
      super().__init__()
  
      self.dropout_prob = dropout_prob
  
      assert (
          activation in ACTIVATIONS
      ), f"{activation} is not in {ACTIVATIONS}"
      activ = getattr(nn, activation)()
  
      hidden_layers = [
          nn.Linear(
              in_features=input_size, out_features=mlp_units[0][0]
          )
      ]
      for layer in mlp_units:
          hidden_layers.append(
              nn.Linear(in_features=layer[0], out_features=layer[1])
          )
          hidden_layers.append(activ)
  
          if self.dropout_prob > 0:
              raise NotImplementedError("dropout")
              # hidden_layers.append(nn.Dropout(p=self.dropout_prob))
  
      output_layer = [
          nn.Linear(in_features=mlp_units[-1][1], out_features=n_theta)
      ]
      layers = hidden_layers + output_layer
      self.layers = nn.Sequential(*layers)
      self.basis = basis
  
imports: from typing import Tuple, Optional
  import numpy
  import torch
  import torch.nn
  from ..losses.pytorch import MAE
  from ..common._base_windows import BaseWindows
label_desc: Use image node_id 1 to create a new NBEATSBlock object from inherited base classes: nn with example: obj = NBEATSBlock(input_size, n_theta, mlp_units, basis, dropout_prob, activation)