class_docstr: Stores a representation of and computes the SSKernel function.
  
  K_L(A^dt, B^dt, C) corresponding to a discretized state space,
  where A is Normal + Low Rank (NPLR)
class_docstr_tok: ["Stores","a","representation","of","and","computes","the","SSKernel","function",".","K_L","(","A^dt",",","B^dt",",","C",")","corresponding","to","a","discretized","state","space",",","where","A","is","Normal","+","Low","Rank","(","NPLR",")"]
code: def default_state(self, *batch_shape):
      C = _r2c(self.C)
      N = C.size(-1)
      H = C.size(-2)
  
      # Cache the tensor contractions we will later do, for efficiency
      # These are put in this function because they depend on the batch size
      step_mode = getattr(
          self, "_step_mode", "dense"
      )  # Used in default_state,
      # which is called without _setup_step() in forward_state()
      if step_mode != "linear":
          N *= 2
  
          if step_mode == "diagonal":
              self.state_contraction = contract_expression(
                  "h n, ... h n -> ... h n",
                  (H, N),
                  batch_shape + (H, N),
              )
          else:
              # Dense (quadratic) case: expand all terms
              self.state_contraction = contract_expression(
                  "h m n, ... h n -> ... h m",
                  (H, N, N),
                  batch_shape + (H, N),
              )
  
          self.input_contraction = contract_expression(
              "h n, ... h -> ... h n",
              (H, N),
              batch_shape + (H,),  # self.dB.shape
          )
  
      self.output_contraction = contract_expression(
          "c h n, ... h n -> ... c h",
          (C.shape[0], H, N),  # self.dC.shape
          batch_shape + (H, N),
      )
  
      state = torch.zeros(
          *batch_shape, H, N, dtype=C.dtype, device=C.device
      )
      return state
  
imports: import logging
  import math
  import os
  from functools import wraps
  from typing import Any, Callable, Optional
  import numpy
  import opt_einsum
  import torch
  import torch.nn
  import torch.nn.functional
  from einops import rearrange, repeat
  from espnet2.asr.state_spaces.components import Activation, DropoutNd, LinearActivation
label_desc: Use image node_id 12 for calling the SSKernelNPLR obj's underlying member method code with example usage: obj.default_state() and returns: state