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,
258
258
multiple mini-batches. Each mini-batch will be feed on each device.
259
259
260
260
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.
265
268
266
269
Returns:
267
270
dict: the result of conversion.
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ def name_has_fc(var):
145
145
146
146
prog = fluid.default_main_program()
147
147
fluid.io.save_vars(executor=exe, dirname=path, main_program=prog,
148
- vars=None)
148
+ vars=None, predicate = name_has_fc )
149
149
# All variables in `main_program` whose name includes "fc" will be saved.
150
150
# And variables are going to be saved separately.
151
151
@@ -369,7 +369,7 @@ def name_has_fc(var):
369
369
370
370
prog = fluid.default_main_program()
371
371
fluid.io.load_vars(executor=exe, dirname=path, main_program=prog,
372
- vars=None)
372
+ vars=None, predicate=name_has_fc )
373
373
# All variables in `main_program` whose name includes "fc" will be loaded.
374
374
# And all the variables are supposed to have been saved in differnet files.
375
375
You can’t perform that action at this time.
0 commit comments