train.py 文件源码

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

项目:lm 作者: siddk 项目源码 文件源码
def main(_):
    """
    Main function, loads and vectorizes the data, instantiates the network variables, and runs the
    training process.
    """
    # Perform data preprocessing here
    # TODO

    with tf.Session() as sess:
        # Instantiate Network
        print 'Building Network!'
        rlangmod = RLangmod(FLAGS.vocabulary_size, FLAGS.embedding_size, FLAGS.hidden_size)

        # Create a saver.
        saver = tf.train.Saver(tf.all_variables())

        # Initialize all variables
        print "Initializing Variables"
        sess.run(tf.initialize_all_variables())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号