5155199f5df2129d10bc52ceffce5d7720538806,labs/09/lemmatizer_noattn.py,,,#,196

Before Change


    parser.add_argument("--recodex", default=False, action="store_true", help="Evaluation in ReCodEx.")
    parser.add_argument("--rnn_dim", default=64, type=int, help="RNN cell dimension.")
    parser.add_argument("--threads", default=1, type=int, help="Maximum number of threads to use.")
    args = parser.parse_args()

    // Fix random seeds and number of threads
    np.random.seed(42)
    tf.random.set_seed(42)

After Change



if __name__ == "__main__":
    // Parse arguments
    parser = argparse.ArgumentParser()
    parser.add_argument("--batch_size", default=10, type=int, help="Batch size.")
    parser.add_argument("--cle_dim", default=64, type=int, help="CLE embedding dimension.")
    parser.add_argument("--epochs", default=10, type=int, help="Number of epochs.")
    parser.add_argument("--max_sentences", default=5000, type=int, help="Maximum number of sentences to load.")
    parser.add_argument("--recodex", default=False, action="store_true", help="Evaluation in ReCodEx.")
    parser.add_argument("--rnn_dim", default=64, type=int, help="RNN cell dimension.")
    parser.add_argument("--seed", default=42, type=int, help="Random seed.")
    parser.add_argument("--threads", default=1, type=int, help="Maximum number of threads to use.")
    parser.add_argument("--verbose", default=False, action="store_true", help="Verbose TF logging.")
    args = parser.parse_args([] if "__file__" not in globals() else None)

    // Fix random seeds and threads
    np.random.seed(args.seed)
    tf.random.set_seed(args.seed)
    tf.config.threading.set_inter_op_parallelism_threads(args.threads)
    tf.config.threading.set_intra_op_parallelism_threads(args.threads)
    if args.recodex:
        tf.keras.utils.get_custom_objects()["glorot_uniform"] = tf.initializers.GlorotUniform(seed=args.seed)
        tf.keras.utils.get_custom_objects()["orthogonal"] = tf.initializers.Orthogonal(seed=args.seed)
        tf.keras.utils.get_custom_objects()["uniform"] = tf.initializers.RandomUniform(seed=args.seed)

    // Report only errors by default
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 16

Instances


Project Name: ufal/npfl114
Commit Name: 5155199f5df2129d10bc52ceffce5d7720538806
Time: 2020-04-29
Author: milan@strakovi.com
File Name: labs/09/lemmatizer_noattn.py
Class Name:
Method Name:


Project Name: ufal/npfl114
Commit Name: 5155199f5df2129d10bc52ceffce5d7720538806
Time: 2020-04-29
Author: milan@strakovi.com
File Name: labs/09/lemmatizer_noattn.py
Class Name:
Method Name:


Project Name: ufal/npfl114
Commit Name: 5155199f5df2129d10bc52ceffce5d7720538806
Time: 2020-04-29
Author: milan@strakovi.com
File Name: labs/09/lemmatizer_attn.py
Class Name:
Method Name:


Project Name: ufal/npfl114
Commit Name: c343409098b4f4b8396119d9f26e040e479a0e2b
Time: 2020-04-20
Author: milan@strakovi.com
File Name: labs/08/speech_recognition_eval.py
Class Name:
Method Name: