def __init__(self, num_of_classes, dropout_p, optimizer, height, width, batch_size, train_maxlen): self.num_of_classes = num_of_classes self.dropout_p = dropout_p self.optimizer = optimizer self.height = height self.width = width self.batch_size = batch_size self.loss = ctc(batch_size, train_maxlen) self._build_model()
def __init__(self, data_set): self.data_set = data_set self.num_of_classes = 84 self.optimizer = 'Adadelta' self.regParam = 0.001 self.height = 32 self.width = 128 self.batch_size = 32 self.loss = ctc(32, 10) self.util = utils(32, 1, CHAR_VECTOR, 32, 128) assure_path_exists("%s_pic/" % self.data_set) self._build_model()