star_platinum.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:identifiera-sarkasm 作者: risnejunior 项目源码 文件源码
def __init__(self,n_classes,rnn_size = 256,n_chunks=75):
        global gru_cell_units
        self._name = "star_platinum"
        self._hidden_layer_1 = {'weights': tf.Variable(tf.random_uniform([rnn_size,1024]),name = "weight1"),
                                'biases': tf.Variable(tf.random_uniform([1024]),name = "biases1")}

        self._hidden_layer_2 = {'weights': tf.Variable(tf.random_uniform([1024,n_chunks * 10]),name = "weight2"),
                                'biases': tf.Variable(tf.random_uniform([n_chunks * 10]),name = "biases2")}

        self._lstm_cell = rnn.BasicLSTMCell(rnn_size)
        self._gru_cell = rnn.GRUCell(gru_cell_units)
        self._output = {'weights': tf.Variable(tf.random_uniform([gru_cell_units,n_classes]),name = "weight3"),
                        'biases': tf.Variable(tf.random_uniform([n_classes]),name = "biases3")}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号