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)),
"values": tf.train.Feature(float_list=tf.train.FloatList(value=values))
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())
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
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: has2k1/plotnine
Commit Name: 43ae81ebbe860010aaaa3d739284ebeb8284e59e
Time: 2017-05-07
Author: has2k1@gmail.com
File Name: plotnine/facets/facet.py
Class Name:
Method Name: unique_combs
Project Name: lcswillems/torch-rl
Commit Name: d13e413bd79dfe516dad31fe0730d183c1239293
Time: 2017-11-28
Author: khrylx@gmail.com
File Name: examples/ppo_gym.py
Class Name:
Method Name: update_params