"examples/deprecated_api/FP16_Optimizer_simple/README.md" did not exist on "0a092aaf715129c8a288007d470e2a984a87e4c4"
Commit 16ada64d authored by Fan Yang's avatar Fan Yang Committed by A. Unique TensorFlower
Browse files

Internal change

PiperOrigin-RevId: 452345162
parent bec89e3a
......@@ -159,11 +159,14 @@ def create_distillation_example(
np.uint8(np.random.rand(image_height, image_width, 3) * 255),
fmt=image_format)
soft_labels = [0.6] * num_labels
labels = [0]
serialized_example = tf.train.Example(
features=tf.train.Features(
feature={
IMAGE_KEY: (tf.train.Feature(
bytes_list=tf.train.BytesList(value=[image]))),
CLASSIFICATION_LABEL_KEY: (tf.train.Feature(
int64_list=tf.train.Int64List(value=labels))),
DISTILATION_LABEL_KEY: (tf.train.Feature(
float_list=tf.train.FloatList(value=soft_labels))),
})).SerializeToString()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment