in ar-cnn/model.py [0:0]
def __init__(self,
input_dim,
num_filters,
growth_factor,
num_layers,
dropout_rate_encoder,
dropout_rate_decoder,
batch_norm_encoder,
batch_norm_decoder,
learning_rate,
optimizer_enum,
pre_trained=None):
# PianoRoll Input Dimensions
self.input_dim = input_dim
# Number of filters in the convolution
self.num_filters = num_filters
# Growth rate of number of filters at each convolution
self.growth_factor = growth_factor
# Number of Encoder and Decoder layers
self.num_layers = num_layers
# A list of dropout values at each encoder layer
self.dropout_rate_encoder = dropout_rate_encoder
# A list of dropout values at each decoder layer
self.dropout_rate_decoder = dropout_rate_decoder
# A list of flags to ensure if batch_nromalization at each encoder
self.batch_norm_encoder = batch_norm_encoder
# A list of flags to ensure if batch_nromalization at each decoder
self.batch_norm_decoder = batch_norm_decoder
# Path to pretrained Model
self.pre_trained = pre_trained
# Learning rate for the model
self.learning_rate = learning_rate
# Optimizer to use while training the model
self.optimizer_enum = optimizer_enum
if self.num_layers < 1:
raise ValueError(
"Number of layers should be greater than or equal to 1")