955a4eaa4c31782022f25f80781fffe62b3fa874,examples/library/minimal_transformer_training.py,,main,#,211

Before Change



  model.initialize(data_config)

  checkpoint_manager = tf.train.CheckpointManager(checkpoint, args.model_dir, max_to_keep=5)
  if checkpoint_manager.latest_checkpoint is not None:
    tf.get_logger().info("Restoring parameters from %s", checkpoint_manager.latest_checkpoint)
    checkpoint.restore(checkpoint_manager.latest_checkpoint)

  if args.run == "train":
    train(args.src, args.tgt, checkpoint_manager)
  elif args.run == "translate":
    translate(args.src)

After Change


      }
  }

  model = onmt.models.TransformerBase()
  runner = onmt.Runner(model, config, auto_config=True)

  if args.run == "train":
    runner.train()
  elif args.run == "translate":
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: OpenNMT/OpenNMT-tf
Commit Name: 955a4eaa4c31782022f25f80781fffe62b3fa874
Time: 2019-11-15
Author: guillaumekln@users.noreply.github.com
File Name: examples/library/minimal_transformer_training.py
Class Name:
Method Name: main


Project Name: reinforceio/tensorforce
Commit Name: 3882ff98e3a8e2a4e16393e72f7107e191c06cf7
Time: 2017-05-15
Author: mi.schaarschmidt@gmail.com
File Name: tensorforce/tests/test_dqn_agent.py
Class Name: TestDQNAgent
Method Name: test_dqn_agent


Project Name: reinforceio/tensorforce
Commit Name: 3882ff98e3a8e2a4e16393e72f7107e191c06cf7
Time: 2017-05-15
Author: mi.schaarschmidt@gmail.com
File Name: tensorforce/tests/test_dqfd_agent.py
Class Name: TestDQFDAgent
Method Name: test_dqfd_agent