seq_labeling.py 文件源码

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

项目:joint-slu-lm 作者: HadoopIt 项目源码 文件源码
def linear_transformation(_X, input_size, n_class):
    with variable_scope.variable_scope("linear"):
      bias_start = 0.0
      weight_out = variable_scope.get_variable("Weight_out", [input_size, n_class])         
      bias_out = variable_scope.get_variable("Bias_out", [n_class],
                                                  initializer=init_ops.constant_initializer(bias_start))

      output = tf.matmul(_X, weight_out) + bias_out
      #regularizers = tf.nn.l2_loss(weight_hidden) + tf.nn.l2_loss(bias_hidden) + tf.nn.l2_loss(weight_out) + tf.nn.l2_loss(bias_out) 
    return output
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号