91db14020567987d8cda29a6140825c888e84917,thumt/data/record.py,,get_input_features,#Any#Any#Any#,105
Before Change
constant_values=bos_id)[:, :-1]
// Final feature map.
features = {
"source": feature_map["inputs"],
"target": targets,
"source_length": tf.to_int32(
tf.reduce_sum(
tf.to_float(tf.not_equal(feature_map["inputs"], 0)),
axis=1
)
),
"target_length": tf.to_int32(
tf.reduce_sum(
tf.to_float(tf.not_equal(feature_map["targets"], 0)),
axis=1
)
),
}
return features
After Change
features = {
"source": feature_map["source"],
"target": feature_map["target"],
"source_length": tf.squeeze(feature_map["source_length"], axis=1),
"target_length": tf.squeeze(feature_map["target_length"], axis=1)
}
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: THUNLP-MT/THUMT
Commit Name: 91db14020567987d8cda29a6140825c888e84917
Time: 2017-11-24
Author: playinf@stu.xmu.edu.cn
File Name: thumt/data/record.py
Class Name:
Method Name: get_input_features
Project Name: NifTK/NiftyNet
Commit Name: ef234844e1604d5496607fcf48886d9e556c0685
Time: 2017-06-21
Author: r.gray@ucl.ac.uk
File Name: engine/training.py
Class Name:
Method Name: run
Project Name: uber/ludwig
Commit Name: e8f4839bbf04d8f0929138e2494b95b31b0c58f3
Time: 2020-05-14
Author: jimthompson5802@gmail.com
File Name: ludwig/models/modules/loss_modules.py
Class Name: SequenceLoss
Method Name: call