@@ -228,16 +228,22 @@ def run(self,
228
228
scope = None ,
229
229
return_numpy = True ,
230
230
use_program_cache = False ):
231
- """
232
- :param program: the program that need to run
233
- :param feed: feed variable list
234
- :param fetch_list: fetch variable list
235
- :param feed_var_name: feed_var_name default to 'feed'
236
- :param fetch_var_name: fetch_var_name default to 'fetch'
237
- :param scope: the scope used to run this program, you can switch it to different scope.
238
- :param return_numpy: convert the fetched tensor to numpy
231
+ """ Run program by this Executor. Feed data by feed map, fetch result by fetch_list.
232
+
233
+ Python executor takes a program, add feed operators and fetch operators to this program according
234
+ to feed map and fetch_list. Feed map provides input data for the program. fetch_list provides
235
+ the variables that user want to get after program run. Note: the executor will run all
236
+ operators in the program but not only the operators dependent by the fetch_list
237
+
238
+ :param program: the program that need to run, if not provied, then default_main_program will be used.
239
+ :param feed: feed variable map, e.g. {"image": ImageData, "label": LableData}
240
+ :param fetch_list: a list of variable that user want to get, run will return them according to this list.
241
+ :param feed_var_name: the name for the input variable of feed Operator.
242
+ :param fetch_var_name: the name for the output variable of feed Operator.
243
+ :param scope: the scope used to run this program, you can switch it to different scope. default is global_scope
244
+ :param return_numpy: if convert the fetched tensor to numpy
239
245
:param use_program_cache: set use_program_cache to true if program not changed compare to the last step.
240
- :return:
246
+ :return: result according to fetch_list.
241
247
"""
242
248
if feed is None :
243
249
feed = {}
0 commit comments