MCPcopy Index your code
hub / github.com/tensorflow/models / load

Method load

official/nlp/data/data_loader.py:27–48  ·  view source on GitHub ↗

Implements DataLoader load method. Builds the entire input pipeline inside the load method. Users can define states inside the DataLoader class and returns a tf.data dataset object. Args: input_context: This is a context class that is passed to the user's input functi

(
      self,
      input_context: Optional[tf.distribute.InputContext] = None
  )

Source from the content-addressed store, hash-verified

25
26 @abc.abstractmethod
27 def load(
28 self,
29 input_context: Optional[tf.distribute.InputContext] = None
30 ) -> tf.data.Dataset:
31 """Implements DataLoader load method.
32
33 Builds the entire input pipeline inside the load method. Users can define
34 states inside the DataLoader class and returns a tf.data dataset
35 object.
36
37 Args:
38 input_context: This is a context class that is passed to the user's input
39 function and contains information about the compute replicas and input
40 pipelines. This object is used for multi-host inputs and passed by the
41 distribution strategy.
42
43 Returns:
44 A per-host tf.data dataset. Note that, we usually create the distributed
45 dataset through the load method, so we should not directly return a
46 distributed dataset here.
47 """
48 pass

Callers 15

read_yaml_to_params_dictFunction · 0.45
override_params_dictFunction · 0.45
from_yamlMethod · 0.45
eval_squadFunction · 0.45
_get_priorsMethod · 0.45
mainFunction · 0.45
get_pretrain_input_dataFunction · 0.45

Calls

no outgoing calls

Tested by 15

test_exportMethod · 0.36
test_export_moduleMethod · 0.36
test_tfds_decodeMethod · 0.36
test_exportMethod · 0.36
test_preprocessorMethod · 0.36
test_postprocessorMethod · 0.36