bf78b94b2907fbcd5740e35a7b21ea2c434e380d,examples/text_generation/tutorial_generate_text.py,,main_restore_embedding_layer,#,132

Before Change


    // sess.run(tf.global_variables_initializer())
    tl.layers.initialize_global_variables(sess)

    tl.files.assign_params(sess, [load_params[0]], emb_net)

    emb_net.print_params()
    emb_net.print_layers()

After Change


    x = tf.placeholder(tf.int32, shape=[batch_size])

    net_in = tl.layers.Input([batch_size], dtype=tf.int32)
    emb_net = tl.layers.Embedding(vocabulary_size, embedding_size, name="emb")(net_in)

    model = tl.models.Model(inputs=net_in, outputs=emb_net, name="model")

    sess.run(tf.global_variables_initializer())

    // TODO: assign certain parameters to model
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: tensorlayer/tensorlayer
Commit Name: bf78b94b2907fbcd5740e35a7b21ea2c434e380d
Time: 2019-02-27
Author: jingqing.zhang15@imperial.ac.uk
File Name: examples/text_generation/tutorial_generate_text.py
Class Name:
Method Name: main_restore_embedding_layer


Project Name: dmlc/dgl
Commit Name: 2cdc4d3c1d17e1ac8be1c44ca54d772084c76f18
Time: 2020-03-21
Author: wmjlyjemaine@gmail.com
File Name: tutorials/basics/1_first.py
Class Name:
Method Name:


Project Name: philipperemy/keras-tcn
Commit Name: 0cfe82c6beb9a28a5ff7da81b86fa0e93c388f14
Time: 2019-11-20
Author: premy@cogent.co.jp
File Name: tasks/save_reload_model.py
Class Name:
Method Name:


Project Name: facebookresearch/Horizon
Commit Name: c473c620d141968c2ed3a62f60bf466d5790393e
Time: 2020-11-06
Author: czxttkl@fb.com
File Name: reagent/models/seq2slate.py
Class Name: PositionalEncoding
Method Name: __init__