(self, seq_length, num_classes, vocab_size)
:param config:
def __init__(self, seq_length, num_classes, vocab_size):
        """

        :param config:
        """
        self.seq_length = seq_length
        self.num_classes = num_classes
        self.vocab_size = vocab_size
        self.filter_sizes = [3, 4, 5]
        self.embedding_dim = 128
        self.num_filters = 128
        self.hidden_dim = 128

        self.input_x = tf.placeholder(tf.int32, [None, self.seq_length], name='input_x')
        self.input_y = tf.placeholder(tf.float32, [None, self.num_classes], name='input_y')
        self.drop_prob = tf.placeholder(tf.float32, name='drop_prob')
        self.learning_rate = tf.placeholder(tf.float32, name='learn_rate')
        self.l2_loss = tf.constant(0.0)
        self.regularizer = tf.contrib.layers.l2_regularizer(scale=0.01)

        self.inference()
def __init__ ( self , seq_length , num_classes , vocab_size ) : self . seq_length = seq_length self . num_classes = num_classes self . vocab_size = vocab_size self . filter_sizes = [ 3 , 4 , 5 ] self . embedding_dim = 128 self . num_filters = 128 self . hidden_dim = 128 self . input_x = tf . placeholder ( tf . int32 , [ None , self . seq_length ] , name = 'input_x' ) self . input_y = tf . placeholder ( tf . float32 , [ None , self . num_classes ] , name = 'input_y' ) self . drop_prob = tf . placeholder ( tf . float32 , name = 'drop_prob' ) self . learning_rate = tf . placeholder ( tf . float32 , name = 'learn_rate' ) self . l2_loss = tf . constant ( 0.0 ) self . regularizer = tf . contrib . layers . l2_regularizer ( scale = 0.01 ) self . inference ( )