MCPcopy Create free account
hub / github.com/apple/axlearn / process_example_fn

Function process_example_fn

axlearn/audio/input_asr.py:154–156  ·  view source on GitHub ↗
(example: Nested[tf.Tensor])

Source from the content-addressed store, hash-verified

152
153 @seqio.map_over_dataset
154 def process_example_fn(example: Nested[tf.Tensor]) -> Nested[tf.Tensor]:
155 example["input_ids"] = tf.concat([[bos_id], example["target_labels"][:-1]], 0)
156 return example
157
158 return process_example_fn
159

Callers

nothing calls this directly

Calls 1

shapeMethod · 0.45

Tested by

no test coverage detected