23Implements a multi-layer convolutional neural network
27from .config_parser
import CNNConfigParser
32 Implements a multi-layer convolutional neural network,
33 with leaky-ReLU non-linearities between layers,
34 according to hyperparameters specified in the config
71 def forward(self, x: torch.Tensor) -> torch.Tensor:
73 Forward pass through the network
79 x = torch.nn.functional.leaky_relu(
80 self._modules[f
"batch_norm{layer}"](self._modules[f
"conv{layer}"](x))
87 x = torch.nn.functional.leaky_relu(self.linear_1(x))
Implements a multi-layer convolutional neural network, with leaky-ReLU non-linearities between layers...
__init__(self, dict config)
torch.Tensor forward(self, torch.Tensor x)
Forward pass through the network.
This file contains the configuration parser for the models.
None parse(self, dict config)
Parse the configuration for the CNN model.