class_docstr: Block for linear layers.
  
  Arguments
  ---------
  input_shape : tuple
      Expected shape of the input.
  neurons : int
      Size of the linear layers.
  activation : torch.nn.Module class
      Class definition to use for constructing activation layers.
  dropout : float
      Rate to use for dropping neurons.
  
  Example
  -------
  >>> inputs = torch.rand(10, 15, 128)
  >>> block = DNN_Block(input_shape=inputs.shape, neurons=64)
  >>> outputs = block(inputs)
  >>> outputs.shape
  torch.Size([10, 15, 64])
class_docstr_tok: ["Block","for","linear","layers",".","Arguments","--","--","--","--","-","input_shape",":","tuple","Expected","shape","of","the","input",".","neurons",":","int","Size","of","the","linear","layers",".","activation",":","torch.nn.Module","class","Class","definition","to","use","for","constructing","activation","layers",".","dropout",":","float","Rate","to","use","for","dropping","neurons",".","Example","--","--","--","-",">",">",">","inputs","=","torch.rand","(","10",",","15",",","128",")",">",">",">","block","=","DNN_Block","(","input_shape=inputs.shape",",","neurons=64",")",">",">",">","outputs","=","block","(","inputs",")",">",">",">","outputs.shape","torch.Size","(","[","10",",","15",",","64","]",")"]
code: def __init__(
      self,
      input_shape,
      neurons,
      activation=torch.nn.LeakyReLU,
      dropout=0.15,
  ):
      super().__init__(input_shape=input_shape)
      self.append(
          sb.nnet.linear.Linear,
          n_neurons=neurons,
          layer_name="linear",
      )
      self.append(sb.nnet.normalization.BatchNorm1d, layer_name="norm")
      self.append(activation(), layer_name="act")
      self.append(torch.nn.Dropout(p=dropout), layer_name="dropout")
  
file_path: speechbrain/speechbrain/lobes/models/CRDNN.py
imports: import torch
  import speechbrain
label_desc: Use image node_id 1 to create a new DNN_Block object from inherited base classes: sb.nnet.containers with example: obj = DNN_Block(input_shape, neurons, activation, dropout)