def __init__(self): self.preprocessor = Preprocess.Preprocessor() self.embedding = Embeddings() self.lr = 5e-4 self.batch_size = 128 self.n_epoch = 10 self.sentence_length = self.preprocessor.sentence_length self.vec_dim = self.embedding.vec_dim self.filter_sizes = [2, 3] self.num_filters = 64 self.num_hidden = 100 self.l2_reg = 0.0004 self.num_classes = 2 self.vocab_size = 212237
def __init__(self, model_type="ABCNN3", clip_gradients=True): self.model_type = model_type self.preprocessor = Preprocess.Preprocessor() self.embedding = Embeddings() self.lr = 0.05 self.batch_size = 64 self.n_epoch = 12 self.sentence_length = self.preprocessor.sentence_length self.w = 4 self.l2_reg = 0.0004 self.di = 50 # The number of convolution kernels self.vec_dim = self.embedding.vec_dim self.num_classes = 2 self.num_layers = 2 self.clip_gradients = clip_gradients self.max_grad_norm = 5. self.eclipse = 1e-9 self.vocab_size = 212237
def __init__(self): self.scale = 0.1 self.vec_dim = 64 self.preprocessor = Preprocess.Preprocessor()