MCPcopy Create free account
hub / github.com/pytorch/pytorch / Map

Function Map

caffe2/python/schema.py:900–913  ·  view source on GitHub ↗

A map is a List of Struct containing keys and values fields. Optionally, you can provide custom name for the key and value fields.

(
    keys,
    values,
    keys_name='keys',
    values_name='values',
    lengths_blob=None
)

Source from the content-addressed store, hash-verified

898
899
900def Map(
901 keys,
902 values,
903 keys_name='keys',
904 values_name='values',
905 lengths_blob=None
906):
907 """A map is a List of Struct containing keys and values fields.
908 Optionally, you can provide custom name for the key and value fields.
909 """
910 return List(
911 Struct((keys_name, keys), (values_name, values)),
912 lengths_blob=lengths_blob
913 )
914
915def MapWithEvicted(
916 keys,

Callers 4

_datasetFunction · 0.90
test_dataset_opsMethod · 0.90
test_record_queueMethod · 0.90
get_fieldMethod · 0.70

Calls 2

StructClass · 0.85
ListClass · 0.70

Tested by 3

_datasetFunction · 0.72
test_dataset_opsMethod · 0.72
test_record_queueMethod · 0.72