ea2a0bfb9f60f7e03a3ed25244622e0d90b275a5,opennmt/inputters/record_inputter.py,,write_sequence_record,#Any#Any#,67

Before Change


    writer: A ``tf.python_io.TFRecordWriter``.
  
  shape = list(vector.shape)
  values = vector.flatten().tolist()

  example = tf.train.Example(features=tf.train.Features(feature={
      "shape": tf.train.Feature(int64_list=tf.train.Int64List(value=shape)),

After Change


  
  feature_list = tf.train.FeatureList(feature=[
      tf.train.Feature(float_list=tf.train.FloatList(value=values))
      for values in vector.astype(np.float32)])
  feature_lists = tf.train.FeatureLists(feature_list={"values": feature_list})
  example = tf.train.SequenceExample(feature_lists=feature_lists)
  writer.write(example.SerializeToString())
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 3

Instances


Project Name: OpenNMT/OpenNMT-tf
Commit Name: ea2a0bfb9f60f7e03a3ed25244622e0d90b275a5
Time: 2019-03-27
Author: guillaume.klein@systrangroup.com
File Name: opennmt/inputters/record_inputter.py
Class Name:
Method Name: write_sequence_record


Project Name: NifTK/NiftyNet
Commit Name: 37318ab8cea6fd45247fae96b736dd5f95b6cea1
Time: 2017-10-03
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/engine/sampler_weighted.py
Class Name:
Method Name: weighted_spatial_coordinates


Project Name: deepinsight/insightface
Commit Name: d5cbbe227489d6a7f0cd5c2b381f969a400880c5
Time: 2018-02-01
Author: guojia@gmail.com
File Name: src/train_softmax.py
Class Name: AccMetric
Method Name: update


Project Name: NifTK/NiftyNet
Commit Name: 141cb21fec5b5557a800cb2131e463b92913985a
Time: 2017-07-18
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/utilities/misc_common.py
Class Name:
Method Name: otsu_threshold


Project Name: deepinsight/insightface
Commit Name: bd7fcc92300a210921f33f55fbdbd07e4ac44401
Time: 2018-02-01
Author: guojia@gmail.com
File Name: src/train_softmax.py
Class Name: AccMetric
Method Name: update