How to add dropout layers automatically to a neural network in pytorch
How to add dropout layers automatically to a neural network in pytorch Question: I have a neural network in pytorch and make each layer automatically via the following structure: class FCN(nn.Module): ##Neural Network def __init__(self,layers): super().__init__() #call __init__ from parent class self.activation = nn.Tanh() self.loss_function = nn.MSELoss(reduction =’mean’) ‘Initialise neural network as a list using …