MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / set_batch_generator

Method set_batch_generator

python/paddle/base/reader.py:1100–1116  ·  view source on GitHub ↗
(self, reader, places=None)

Source from the content-addressed store, hash-verified

1098 return self
1099
1100 def set_batch_generator(self, reader, places=None):
1101 if isinstance(places, (list, tuple)):
1102 places = _get_paddle_place_list(places)
1103 else:
1104 places = _get_paddle_place(places)
1105 self._tensor_reader = reader
1106 if self._iterable:
1107 assert places is not None, (
1108 "Places cannot be None when DataLoader is iterable"
1109 )
1110 self._places = _convert_places(places)
1111 else:
1112 if places is not None:
1113 logging.info(
1114 'places would be omitted when DataLoader is not iterable'
1115 )
1116 return self
1117
1118
1119@deprecated()

Calls 4

_get_paddle_place_listFunction · 0.85
_get_paddle_placeFunction · 0.85
_convert_placesFunction · 0.70
infoMethod · 0.45