class_docstr: N-HiTS Model.
class_docstr_tok: ["N-HiTS","Model","."]
code: def __init__(
      self,
      context_length,
      prediction_length,
      output_size: int,
      static_size,
      encoder_covariate_size,
      decoder_covariate_size,
      static_hidden_size,
      n_blocks: list,
      n_layers: list,
      hidden_size: list,
      pooling_sizes: list,
      downsample_frequencies: list,
      pooling_mode,
      interpolation_mode,
      dropout,
      activation,
      initialization,
      batch_normalization,
      shared_weights,
      naive_level: bool,
  ):
      super().__init__()
  
      self.prediction_length = prediction_length
      self.context_length = context_length
      self.output_size = output_size
      self.naive_level = naive_level
  
      blocks = self.create_stack(
          n_blocks=n_blocks,
          context_length=context_length,
          prediction_length=prediction_length,
          output_size=output_size,
          encoder_covariate_size=encoder_covariate_size,
          decoder_covariate_size=decoder_covariate_size,
          static_size=static_size,
          static_hidden_size=static_hidden_size,
          n_layers=n_layers,
          hidden_size=hidden_size,
          pooling_sizes=pooling_sizes,
          downsample_frequencies=downsample_frequencies,
          pooling_mode=pooling_mode,
          interpolation_mode=interpolation_mode,
          batch_normalization=batch_normalization,
          dropout=dropout,
          activation=activation,
          shared_weights=shared_weights,
          initialization=initialization,
      )
      self.blocks = torch.nn.ModuleList(blocks)
  
imports: from functools import partial
  from typing import List, Tuple
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new NHiTS object from inherited base classes: nn with example: obj = NHiTS(context_length, prediction_length, output_size, static_size, encoder_covariate_size, decoder_covariate_size, static_hidden_size, n_blocks, n_layers, hidden_size, pooling_sizes, downsample_frequencies, pooling_mode, interpolation_mode, dropout, activation, initialization, batch_normalization, shared_weights, naive_level)