def __init__(self, input_dim, output_class_num, kernels, cnn_size, hidden_size, dropout, **kwargs):
    super(ConvBank, self).__init__()
    self.drop_p = dropout
    self.in_linear = nn.Linear(input_dim, hidden_size)
    latest_size = hidden_size
    self.cnns = nn.ModuleList()
    assert (len(kernels) > 0)
    for kernel in kernels:
        self.cnns.append(nn.Conv1d(latest_size, cnn_size, kernel, padding=(kernel // 2)))
    latest_size = (cnn_size * len(kernels))
    self.out_linear = nn.Linear(latest_size, output_class_num)
def __init__(self, input_dim, output_class_num, kernels, cnn_size, hidden_size, dropout, **kwargs):
    super(ConvBank, self).__init__()
    self.drop_p = dropout
    self.in_linear = nn.Linear(input_dim, hidden_size)
    latest_size = hidden_size
    self.cnns = nn.ModuleList()
    assert (len(kernels) > 0)
    for kernel in kernels:
        self.cnns.append(nn.Conv1d(latest_size, cnn_size, kernel, padding=(kernel // 2)))
    latest_size = (cnn_size * len(kernels))
    self.out_linear = nn.Linear(latest_size, output_class_num)