Coverage Control Library
Loading...
Searching...
No Matches
CNNBackBone Class Reference

Implements a multi-layer convolutional neural network, with leaky-ReLU non-linearities between layers, according to hyperparameters specified in the config. More...

+ Inheritance diagram for CNNBackBone:

Public Member Functions

 __init__ (self, dict config)
 
torch.Tensor forward (self, torch.Tensor x)
 Forward pass through the network.
 
- Public Member Functions inherited from CNNConfigParser
None parse (self, dict config)
 Parse the configuration for the CNN model.
 

Public Attributes

 input_dim
 
 latent_size = self.kernel_size
 
tuple flatten_size
 
 num_layers
 
- Public Attributes inherited from CNNConfigParser
 config = None
 
 input_dim = None
 
 output_dim = None
 
 num_layers = None
 
 latent_size = None
 
 kernel_size = None
 
 image_size = None
 

Detailed Description

Implements a multi-layer convolutional neural network, with leaky-ReLU non-linearities between layers, according to hyperparameters specified in the config.

Definition at line 35 of file cnn_backbone.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
dict config )

Reimplemented from CNNConfigParser.

Definition at line 37 of file cnn_backbone.py.

Member Function Documentation

◆ forward()

torch.Tensor forward ( self,
torch.Tensor x )

Forward pass through the network.

Parameters
xinput tensor

Definition at line 77 of file cnn_backbone.py.

Member Data Documentation

◆ flatten_size

flatten_size
Initial value:
= (
self.latent_size
* (self.image_size - self.num_layers * (self.kernel_size - 1)) ** 2
)

Definition at line 60 of file cnn_backbone.py.

◆ input_dim

input_dim

Definition at line 44 of file cnn_backbone.py.

◆ latent_size

latent_size = self.kernel_size

Definition at line 44 of file cnn_backbone.py.

◆ num_layers

num_layers

Definition at line 78 of file cnn_backbone.py.