class_docstr: A deep neural network for the reverse diffusion preocess.
class_docstr_tok: ["A","deep","neural","network","for","the","reverse","diffusion","preocess","."]
code: def __init__(
      self,
      dims: typing.List,
      emb_size: int,
      time_type="cat",
      act_func="tanh",
      norm=False,
      dropout=0.5,
  ):
      super(DNN, self).__init__()
      self.dims = dims
      self.time_type = time_type
      self.time_emb_dim = emb_size
      self.norm = norm
  
      self.emb_layer = nn.Linear(self.time_emb_dim, self.time_emb_dim)
  
      if self.time_type == "cat":
          # Concatenate timestep embedding with input
          self.dims[0] += self.time_emb_dim
      else:
          raise ValueError(
              "Unimplemented timestep embedding type %s"
              % self.time_type
          )
  
      self.mlp_layers = MLPLayers(
          layers=self.dims,
          dropout=0,
          activation=act_func,
          last_activation=False,
      )
      self.drop = nn.Dropout(dropout)
  
      self.apply(xavier_normal_initialization)
  
imports: import enum
  import math
  import copy
  import numpy
  import torch
  import torch.nn.functional
  import torch.nn
  from recbole.model.init import xavier_normal_initialization
  from recbole.utils.enum_type import InputType
  from recbole.model.abstract_recommender import AutoEncoderMixin, GeneralRecommender
  from recbole.model.layers import MLPLayers
  import typing
label_desc: Use image node_id 1 to create a new DNN object from inherited base classes: nn with example: obj = DNN(dims, emb_size, time_type, act_func, norm, dropout)