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

Function _convert_places

python/paddle/base/reader.py:86–98  ·  view source on GitHub ↗
(places)

Source from the content-addressed store, hash-verified

84
85
86def _convert_places(places):
87 if not isinstance(places, (list, tuple)):
88 places = [places]
89
90 ret = []
91 for p in places:
92 if not isinstance(p, core.Place):
93 tmp = core.Place()
94 tmp.set_place(p)
95 p = tmp
96
97 ret.append(p)
98 return ret
99
100
101# NOTE(chenweihang): _reader_process_loop must be top level method to be pickled

Callers 3

set_batch_generatorMethod · 0.70
set_batch_generatorMethod · 0.70
__init__Method · 0.70

Calls 3

PlaceMethod · 0.45
set_placeMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected