File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -258,10 +258,13 @@ def decorate_reader(self,
258258 multiple mini-batches. Each mini-batch will be feed on each device.
259259
260260 Args:
261- reader(fun): the input data.
262- multi_devices(bool): the number of places. Default None.
263- num_places(int): the number of places. Default None.
264- drop_last(bool): the number of places. Default None.
261+ reader(function): the reader is the function which can generate data.
262+ multi_devices(bool): whether to use multiple devices or not.
263+ num_places(int): if the multi_devices is True, you can specify the number
264+ of GPU to use, if 'num_places' is None, the function will use all the
265+ GPU of the current machine. Default None.
266+ drop_last(bool): whether to drop the last batch if the
267+ size of the last batch is less than batch_size. Default True.
265268
266269 Returns:
267270 dict: the result of conversion.
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ def name_has_fc(var):
145145
146146 prog = fluid.default_main_program()
147147 fluid.io.save_vars(executor=exe, dirname=path, main_program=prog,
148- vars=None)
148+ vars=None, predicate = name_has_fc )
149149 # All variables in `main_program` whose name includes "fc" will be saved.
150150 # And variables are going to be saved separately.
151151
@@ -369,7 +369,7 @@ def name_has_fc(var):
369369
370370 prog = fluid.default_main_program()
371371 fluid.io.load_vars(executor=exe, dirname=path, main_program=prog,
372- vars=None)
372+ vars=None, predicate=name_has_fc )
373373 # All variables in `main_program` whose name includes "fc" will be loaded.
374374 # And all the variables are supposed to have been saved in differnet files.
375375
You can’t perform that action at this time.
0 commit comments