bf48c8a5741904f99b003ae1a8d718d283220f40,open_seq2seq/utils/funcs.py,,train,#Any#Any#Any#,14

Before Change


    hooks=hooks,
  ) as sess:
    if train_model.on_horovod:
      sess.run(train_model.get_data_layer().iterator.initializer)
    else:
      for i in range(train_model.num_gpus):
        sess.run(train_model.get_data_layer(i).iterator.initializer)
    step = 0

After Change


  if train_model.on_horovod:
    init_data_layer = train_model.get_data_layer().iterator.initializer
  else:
    init_data_layer = tf.group(
      [train_model.get_data_layer(i).iterator.initializer
       for i in range(train_model.num_gpus)]
    )

  scaffold = tf.train.Scaffold(
    local_init_op=tf.group(tf.local_variables_initializer(), init_data_layer)
  )
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: NVIDIA/OpenSeq2Seq
Commit Name: bf48c8a5741904f99b003ae1a8d718d283220f40
Time: 2018-05-14
Author: igor.a.gitman@gmail.com
File Name: open_seq2seq/utils/funcs.py
Class Name:
Method Name: train


Project Name: ray-project/ray
Commit Name: 283f4d1060060d3a10a62ac5d74c9ca45c596791
Time: 2020-09-01
Author: ian.rodney@gmail.com
File Name: python/ray/autoscaler/command_runner.py
Class Name: DockerCommandRunner
Method Name: run_init


Project Name: uber/ludwig
Commit Name: 87c962eb21167aa6ab80f7dd6654b1e89deff9e1
Time: 2020-03-01
Author: jimthompson5802@aol.com
File Name: ludwig/models/model.py
Class Name: Model
Method Name: batch_evaluation