mindspore 2.1.0__cp37-cp37m-win_amd64.whl → 2.2.11__cp37-cp37m-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of mindspore might be problematic. Click here for more details.

Files changed (511) hide show
  1. mindspore/.commit_id +1 -1
  2. mindspore/Microsoft.VisualStudio.Telemetry.dll +0 -0
  3. mindspore/Newtonsoft.Json.dll +0 -0
  4. mindspore/__init__.py +4 -1
  5. mindspore/_c_dataengine.cp37-win_amd64.pyd +0 -0
  6. mindspore/_c_expression.cp37-win_amd64.pyd +0 -0
  7. mindspore/_c_mindrecord.cp37-win_amd64.pyd +0 -0
  8. mindspore/_check_jit_forbidden_api.py +3 -1
  9. mindspore/_checkparam.py +23 -29
  10. mindspore/_extends/graph_kernel/__init__.py +0 -1
  11. mindspore/_extends/graph_kernel/model/graph_split.py +84 -76
  12. mindspore/_extends/graph_kernel/model/model_builder.py +9 -50
  13. mindspore/_extends/graph_kernel/splitter.py +4 -11
  14. mindspore/_extends/parallel_compile/akg_compiler/akg_process.py +122 -15
  15. mindspore/_extends/parallel_compile/akg_compiler/build_tbe_kernel.py +84 -67
  16. mindspore/_extends/parallel_compile/akg_compiler/tbe_topi.py +4 -2
  17. mindspore/_extends/parallel_compile/akg_compiler/util.py +10 -7
  18. mindspore/_extends/parallel_compile/tbe_compiler/tbe_adapter.py +2 -2
  19. mindspore/_extends/parallel_compile/tbe_compiler/tbe_helper.py +6 -5
  20. mindspore/_extends/parallel_compile/tbe_compiler/tbe_job.py +1 -1
  21. mindspore/_extends/parallel_compile/tbe_compiler/tbe_job_manager.py +1 -1
  22. mindspore/_extends/parse/__init__.py +13 -15
  23. mindspore/_extends/parse/namespace.py +7 -33
  24. mindspore/_extends/parse/parser.py +67 -72
  25. mindspore/_extends/parse/resources.py +1 -1
  26. mindspore/_extends/parse/standard_method.py +86 -106
  27. mindspore/_extends/parse/trope.py +1 -1
  28. mindspore/_extends/remote/kernel_build_server.py +25 -7
  29. mindspore/_extends/remote/kernel_build_server_akg_v2.py +55 -0
  30. mindspore/_install_custom.py +43 -0
  31. mindspore/amp.py +47 -11
  32. mindspore/atlprov.dll +0 -0
  33. mindspore/boost/boost.py +1 -8
  34. mindspore/boost/boost_cell_wrapper.py +3 -2
  35. mindspore/boost/grad_accumulation.py +1 -1
  36. mindspore/boost/group_loss_scale_manager.py +8 -7
  37. mindspore/c1.dll +0 -0
  38. mindspore/c1xx.dll +0 -0
  39. mindspore/c2.dll +0 -0
  40. mindspore/common/__init__.py +5 -3
  41. mindspore/common/_jit_fallback_utils.py +6 -0
  42. mindspore/common/_register_for_adapter.py +2 -0
  43. mindspore/common/_register_for_tensor.py +2 -2
  44. mindspore/common/_stub_tensor.py +13 -0
  45. mindspore/common/_utils.py +29 -0
  46. mindspore/common/api.py +174 -259
  47. mindspore/common/auto_dynamic_shape.py +494 -0
  48. mindspore/common/dtype.py +18 -11
  49. mindspore/common/dump.py +6 -4
  50. mindspore/common/initializer.py +14 -14
  51. mindspore/common/jit_config.py +33 -15
  52. mindspore/common/lazy_inline.py +126 -7
  53. mindspore/common/mindir_util.py +101 -0
  54. mindspore/common/parameter.py +51 -41
  55. mindspore/common/seed.py +4 -4
  56. mindspore/common/sparse_tensor.py +13 -14
  57. mindspore/common/tensor.py +243 -165
  58. mindspore/communication/__init__.py +7 -4
  59. mindspore/communication/_comm_helper.py +83 -4
  60. mindspore/communication/management.py +152 -84
  61. mindspore/config/op_info.config +14 -3
  62. mindspore/context.py +152 -61
  63. mindspore/dataset/__init__.py +5 -5
  64. mindspore/dataset/audio/__init__.py +2 -2
  65. mindspore/dataset/audio/transforms.py +52 -52
  66. mindspore/dataset/callback/ds_callback.py +16 -2
  67. mindspore/dataset/core/config.py +68 -51
  68. mindspore/dataset/engine/cache_client.py +33 -7
  69. mindspore/dataset/engine/datasets.py +250 -112
  70. mindspore/dataset/engine/datasets_audio.py +43 -211
  71. mindspore/dataset/engine/datasets_standard_format.py +16 -35
  72. mindspore/dataset/engine/datasets_text.py +43 -67
  73. mindspore/dataset/engine/datasets_user_defined.py +86 -100
  74. mindspore/dataset/engine/datasets_vision.py +219 -1029
  75. mindspore/dataset/engine/iterators.py +11 -4
  76. mindspore/dataset/engine/obs/obs_mindrecord_dataset.py +4 -0
  77. mindspore/dataset/engine/obs/util.py +3 -0
  78. mindspore/dataset/engine/samplers.py +1 -1
  79. mindspore/dataset/engine/validators.py +19 -5
  80. mindspore/dataset/text/__init__.py +3 -3
  81. mindspore/dataset/text/transforms.py +101 -127
  82. mindspore/dataset/text/utils.py +205 -138
  83. mindspore/dataset/transforms/__init__.py +1 -1
  84. mindspore/dataset/transforms/py_transforms_util.py +40 -12
  85. mindspore/dataset/transforms/transforms.py +95 -40
  86. mindspore/dataset/utils/browse_dataset.py +8 -2
  87. mindspore/dataset/utils/line_reader.py +17 -19
  88. mindspore/dataset/vision/__init__.py +3 -3
  89. mindspore/dataset/vision/c_transforms.py +6 -3
  90. mindspore/dataset/vision/transforms.py +409 -287
  91. mindspore/dataset/vision/utils.py +13 -14
  92. mindspore/dataset/vision/validators.py +11 -1
  93. mindspore/dnnl.dll +0 -0
  94. mindspore/dpcmi.dll +0 -0
  95. mindspore/experimental/map_parameter.py +14 -0
  96. mindspore/{nn/optim_ex → experimental/optim}/__init__.py +30 -29
  97. mindspore/{nn/optim_ex → experimental/optim}/adam.py +60 -67
  98. mindspore/{nn/optim_ex → experimental/optim}/adamw.py +181 -203
  99. mindspore/experimental/optim/lr_scheduler.py +1427 -0
  100. mindspore/{nn/optim_ex → experimental/optim}/optimizer.py +252 -259
  101. mindspore/{nn/optim_ex → experimental/optim}/sgd.py +147 -152
  102. mindspore/gen_ops.py +273 -0
  103. mindspore/include/OWNERS +0 -1
  104. mindspore/include/api/data_type.h +2 -1
  105. mindspore/include/api/graph.h +0 -15
  106. mindspore/include/api/kernel.h +2 -0
  107. mindspore/include/api/kernel_api.h +37 -12
  108. mindspore/include/api/model.h +17 -14
  109. mindspore/include/api/status.h +8 -3
  110. mindspore/include/api/types.h +37 -4
  111. mindspore/include/c_api/ms/abstract.h +67 -0
  112. mindspore/include/c_api/ms/attribute.h +197 -0
  113. mindspore/include/c_api/ms/base/handle_types.h +43 -0
  114. mindspore/include/c_api/ms/base/macros.h +32 -0
  115. mindspore/include/c_api/ms/base/status.h +33 -0
  116. mindspore/include/c_api/ms/base/types.h +282 -0
  117. mindspore/include/c_api/ms/context.h +102 -0
  118. mindspore/include/c_api/ms/graph.h +160 -0
  119. mindspore/include/c_api/ms/node.h +606 -0
  120. mindspore/include/c_api/ms/tensor.h +161 -0
  121. mindspore/include/c_api/ms/value.h +84 -0
  122. mindspore/include/dataset/constants.h +6 -5
  123. mindspore/include/dataset/execute.h +23 -13
  124. mindspore/include/dataset/text.h +26 -26
  125. mindspore/include/dataset/transforms.h +13 -13
  126. mindspore/include/dataset/vision.h +60 -60
  127. mindspore/include/dataset/vision_ascend.h +5 -6
  128. mindspore/include/dataset/vision_lite.h +17 -17
  129. mindspore/jpeg62.dll +0 -0
  130. mindspore/mindrecord/tools/imagenet_to_mr.py +1 -1
  131. mindspore/mindrecord/tools/mnist_to_mr.py +2 -2
  132. mindspore/mindspore_backend.dll +0 -0
  133. mindspore/mindspore_common.dll +0 -0
  134. mindspore/mindspore_core.dll +0 -0
  135. mindspore/mindspore_glog.dll +0 -0
  136. mindspore/mindspore_shared_lib.dll +0 -0
  137. mindspore/msobj140.dll +0 -0
  138. mindspore/mspdb140.dll +0 -0
  139. mindspore/mspdbcore.dll +0 -0
  140. mindspore/mspdbst.dll +0 -0
  141. mindspore/mspft140.dll +0 -0
  142. mindspore/msvcdis140.dll +0 -0
  143. mindspore/msvcp140_1.dll +0 -0
  144. mindspore/msvcp140_2.dll +0 -0
  145. mindspore/msvcp140_atomic_wait.dll +0 -0
  146. mindspore/msvcp140_codecvt_ids.dll +0 -0
  147. mindspore/nn/__init__.py +0 -2
  148. mindspore/nn/cell.py +313 -74
  149. mindspore/nn/dynamic_lr.py +21 -21
  150. mindspore/nn/layer/activation.py +22 -30
  151. mindspore/nn/layer/basic.py +15 -13
  152. mindspore/nn/layer/channel_shuffle.py +1 -1
  153. mindspore/nn/layer/container.py +271 -9
  154. mindspore/nn/layer/conv.py +323 -204
  155. mindspore/nn/layer/dense.py +8 -5
  156. mindspore/nn/layer/embedding.py +33 -27
  157. mindspore/nn/layer/flash_attention.py +61 -95
  158. mindspore/nn/layer/image.py +8 -6
  159. mindspore/nn/layer/math.py +16 -25
  160. mindspore/nn/layer/normalization.py +107 -66
  161. mindspore/nn/layer/padding.py +1 -1
  162. mindspore/nn/layer/pooling.py +131 -109
  163. mindspore/nn/layer/rnn_cells.py +27 -22
  164. mindspore/nn/layer/rnns.py +13 -16
  165. mindspore/nn/layer/thor_layer.py +1 -1
  166. mindspore/nn/layer/transformer.py +221 -154
  167. mindspore/nn/learning_rate_schedule.py +9 -1
  168. mindspore/nn/loss/loss.py +235 -174
  169. mindspore/nn/optim/ada_grad.py +2 -1
  170. mindspore/nn/optim/adadelta.py +1 -0
  171. mindspore/nn/optim/adafactor.py +2 -1
  172. mindspore/nn/optim/adam.py +7 -4
  173. mindspore/nn/optim/adamax.py +3 -2
  174. mindspore/nn/optim/adasum.py +2 -2
  175. mindspore/nn/optim/asgd.py +2 -3
  176. mindspore/nn/optim/ftrl.py +6 -5
  177. mindspore/nn/optim/lamb.py +7 -4
  178. mindspore/nn/optim/lars.py +1 -1
  179. mindspore/nn/optim/lazyadam.py +5 -3
  180. mindspore/nn/optim/momentum.py +2 -1
  181. mindspore/nn/optim/optimizer.py +53 -4
  182. mindspore/nn/optim/proximal_ada_grad.py +3 -4
  183. mindspore/nn/optim/rmsprop.py +4 -3
  184. mindspore/nn/optim/rprop.py +23 -12
  185. mindspore/nn/optim/sgd.py +26 -11
  186. mindspore/nn/optim/thor.py +9 -7
  187. mindspore/nn/probability/bijector/bijector.py +5 -5
  188. mindspore/nn/probability/bijector/power_transform.py +27 -27
  189. mindspore/nn/probability/bijector/softplus.py +3 -3
  190. mindspore/nn/probability/distribution/_utils/custom_ops.py +3 -3
  191. mindspore/nn/probability/distribution/bernoulli.py +5 -5
  192. mindspore/nn/probability/distribution/beta.py +3 -3
  193. mindspore/nn/probability/distribution/categorical.py +7 -7
  194. mindspore/nn/probability/distribution/cauchy.py +0 -1
  195. mindspore/nn/probability/distribution/distribution.py +3 -3
  196. mindspore/nn/probability/distribution/gamma.py +3 -3
  197. mindspore/nn/probability/distribution/geometric.py +4 -4
  198. mindspore/nn/probability/distribution/gumbel.py +4 -4
  199. mindspore/nn/probability/distribution/log_normal.py +2 -2
  200. mindspore/nn/probability/distribution/logistic.py +2 -2
  201. mindspore/nn/probability/distribution/poisson.py +4 -4
  202. mindspore/nn/probability/distribution/transformed_distribution.py +3 -3
  203. mindspore/nn/probability/distribution/uniform.py +6 -6
  204. mindspore/nn/wrap/__init__.py +4 -2
  205. mindspore/nn/wrap/cell_wrapper.py +87 -34
  206. mindspore/nn/wrap/grad_reducer.py +8 -5
  207. mindspore/nn/wrap/loss_scale.py +105 -42
  208. mindspore/numpy/array_creations.py +1 -2
  209. mindspore/numpy/array_ops.py +3 -2
  210. mindspore/numpy/utils_const.py +5 -5
  211. mindspore/opencv_core452.dll +0 -0
  212. mindspore/opencv_imgcodecs452.dll +0 -0
  213. mindspore/opencv_imgproc452.dll +0 -0
  214. mindspore/ops/_grad_experimental/__init__.py +0 -5
  215. mindspore/ops/_grad_experimental/grad_array_ops.py +2 -3
  216. mindspore/ops/_grad_experimental/grad_comm_ops.py +15 -2
  217. mindspore/ops/_grad_experimental/grad_debug_ops.py +0 -37
  218. mindspore/ops/_grad_experimental/grad_implementations.py +11 -1
  219. mindspore/ops/_grad_experimental/grad_inner_ops.py +2 -216
  220. mindspore/ops/_grad_experimental/grad_math_ops.py +19 -199
  221. mindspore/ops/_grad_experimental/grad_sparse.py +15 -0
  222. mindspore/ops/_grad_experimental/grad_sparse_ops.py +3 -3
  223. mindspore/ops/_op_impl/_custom_op/dsd_back_impl.py +1 -1
  224. mindspore/ops/_op_impl/aicpu/__init__.py +14 -2
  225. mindspore/ops/_op_impl/aicpu/add.py +3 -3
  226. mindspore/ops/_op_impl/aicpu/bias_add_grad.py +0 -1
  227. mindspore/ops/_op_impl/aicpu/count_nonzero.py +43 -0
  228. mindspore/ops/_op_impl/{_custom_op/flash_attention/constants.py → aicpu/eps.py} +18 -27
  229. mindspore/ops/_op_impl/aicpu/gamma.py +2 -2
  230. mindspore/ops/_op_impl/aicpu/linear_sum_assignment.py +21 -2
  231. mindspore/ops/_op_impl/aicpu/log_uniform_candidate_sampler.py +6 -3
  232. mindspore/ops/_op_impl/aicpu/lu_unpack_grad.py +0 -1
  233. mindspore/ops/_op_impl/aicpu/multinomial.py +3 -3
  234. mindspore/ops/_op_impl/aicpu/parameterized_truncated_normal.py +15 -7
  235. mindspore/ops/_op_impl/aicpu/random_categorical.py +39 -19
  236. mindspore/ops/_op_impl/aicpu/random_choice_with_mask.py +5 -2
  237. mindspore/ops/_op_impl/aicpu/random_poisson.py +103 -52
  238. mindspore/ops/_op_impl/aicpu/random_shuffle.py +17 -15
  239. mindspore/ops/_op_impl/aicpu/{sparseaddmm.py → sparse_addmm.py} +2 -2
  240. mindspore/ops/_op_impl/aicpu/{sparsesparsemaximum.py → sparse_sparse_maximum.py} +4 -4
  241. mindspore/ops/_op_impl/aicpu/standard_laplace.py +5 -5
  242. mindspore/ops/_op_impl/aicpu/standard_normal.py +5 -5
  243. mindspore/ops/_op_impl/aicpu/truncated_normal.py +9 -7
  244. mindspore/ops/_op_impl/aicpu/uniform.py +5 -3
  245. mindspore/ops/_op_impl/aicpu/uniform_candidate_sampler.py +8 -4
  246. mindspore/ops/_op_impl/aicpu/uniform_int.py +5 -5
  247. mindspore/ops/_op_impl/aicpu/uniform_real.py +4 -4
  248. mindspore/ops/_op_impl/tbe/__init__.py +4 -4
  249. mindspore/ops/_op_impl/tbe/inplace_index_add.py +7 -3
  250. mindspore/ops/_op_impl/tbe/trans_data_ds.py +2 -0
  251. mindspore/ops/_primitive_cache.py +1 -1
  252. mindspore/ops/_tracefunc.py +45 -13
  253. mindspore/ops/_utils/utils.py +6 -1
  254. mindspore/ops/_vmap/vmap_array_ops.py +3 -3
  255. mindspore/ops/_vmap/vmap_base.py +3 -3
  256. mindspore/ops/_vmap/vmap_convolution_ops.py +1 -1
  257. mindspore/ops/_vmap/vmap_grad_math_ops.py +6 -4
  258. mindspore/ops/_vmap/vmap_math_ops.py +5 -2
  259. mindspore/ops/_vmap/vmap_nn_ops.py +61 -7
  260. mindspore/ops/arg_dtype_cast.py +54 -0
  261. mindspore/ops/composite/base.py +37 -10
  262. mindspore/ops/composite/math_ops.py +5 -4
  263. mindspore/ops/composite/multitype_ops/_compile_utils.py +275 -73
  264. mindspore/ops/composite/multitype_ops/_constexpr_utils.py +16 -9
  265. mindspore/ops/composite/multitype_ops/add_impl.py +43 -4
  266. mindspore/ops/composite/multitype_ops/getitem_impl.py +42 -4
  267. mindspore/ops/composite/multitype_ops/ones_like_impl.py +6 -0
  268. mindspore/ops/composite/multitype_ops/setitem_impl.py +2 -1
  269. mindspore/ops/composite/multitype_ops/zeros_like_impl.py +9 -0
  270. mindspore/ops/deprecated.py +304 -0
  271. mindspore/ops/function/__init__.py +4 -1
  272. mindspore/ops/function/array_func.py +174 -193
  273. mindspore/ops/function/clip_func.py +81 -13
  274. mindspore/ops/function/debug_func.py +1 -1
  275. mindspore/ops/function/grad/grad_func.py +18 -9
  276. mindspore/ops/function/image_func.py +10 -4
  277. mindspore/ops/function/linalg_func.py +5 -5
  278. mindspore/ops/function/math_func.py +575 -386
  279. mindspore/ops/function/nn_func.py +568 -260
  280. mindspore/ops/function/random_func.py +88 -57
  281. mindspore/ops/function/sparse_func.py +1 -1
  282. mindspore/ops/function/sparse_unary_func.py +14 -12
  283. mindspore/ops/function/vmap_func.py +6 -5
  284. mindspore/ops/functional.py +15 -10
  285. mindspore/ops/op_info_register.py +244 -25
  286. mindspore/ops/operations/__init__.py +31 -19
  287. mindspore/ops/operations/_grad_ops.py +71 -7
  288. mindspore/ops/operations/_inner_ops.py +350 -17
  289. mindspore/ops/operations/_quant_ops.py +4 -8
  290. mindspore/ops/operations/_sequence_ops.py +42 -0
  291. mindspore/ops/operations/array_ops.py +68 -282
  292. mindspore/ops/operations/comm_ops.py +107 -59
  293. mindspore/ops/operations/custom_ops.py +94 -70
  294. mindspore/ops/operations/debug_ops.py +8 -4
  295. mindspore/ops/operations/image_ops.py +18 -12
  296. mindspore/ops/operations/inner_ops.py +26 -3
  297. mindspore/ops/operations/math_ops.py +192 -144
  298. mindspore/ops/operations/nn_ops.py +857 -489
  299. mindspore/ops/operations/other_ops.py +0 -22
  300. mindspore/ops/operations/random_ops.py +53 -111
  301. mindspore/ops/operations/sparse_ops.py +3 -1
  302. mindspore/ops/primitive.py +24 -18
  303. mindspore/parallel/_auto_parallel_context.py +68 -8
  304. mindspore/parallel/_cost_model_context.py +2 -2
  305. mindspore/parallel/_offload_context.py +17 -3
  306. mindspore/parallel/_parallel_serialization.py +12 -5
  307. mindspore/parallel/_ps_context.py +12 -0
  308. mindspore/parallel/_tensor.py +18 -13
  309. mindspore/parallel/_transformer/layers.py +5 -3
  310. mindspore/parallel/_transformer/loss.py +1 -0
  311. mindspore/parallel/_transformer/moe.py +2 -2
  312. mindspore/parallel/_transformer/op_parallel_config.py +12 -1
  313. mindspore/parallel/_transformer/transformer.py +23 -3
  314. mindspore/parallel/_utils.py +11 -7
  315. mindspore/parallel/algo_parameter_config.py +85 -5
  316. mindspore/parallel/checkpoint_transform.py +19 -12
  317. mindspore/parallel/shard.py +21 -14
  318. mindspore/pgodb140.dll +0 -0
  319. mindspore/pgort140.dll +0 -0
  320. mindspore/profiler/common/struct_type.py +3 -3
  321. mindspore/profiler/common/util.py +4 -2
  322. mindspore/profiler/envprofiling.py +1 -1
  323. mindspore/profiler/parser/aicpu_data_parser.py +5 -3
  324. mindspore/profiler/parser/ascend_flops_generator.py +2 -2
  325. mindspore/profiler/parser/ascend_fpbp_generator.py +1 -1
  326. mindspore/profiler/parser/ascend_hccl_generator.py +249 -12
  327. mindspore/profiler/parser/ascend_msprof_exporter.py +150 -255
  328. mindspore/profiler/parser/ascend_msprof_generator.py +204 -17
  329. mindspore/profiler/parser/ascend_op_generator.py +6 -6
  330. mindspore/profiler/parser/ascend_steptrace_generator.py +6 -4
  331. mindspore/profiler/parser/ascend_timeline_generator.py +14 -187
  332. mindspore/profiler/parser/base_timeline_generator.py +10 -8
  333. mindspore/profiler/parser/cpu_gpu_timeline_generator.py +16 -12
  334. mindspore/profiler/parser/flops_parser.py +15 -11
  335. mindspore/profiler/parser/framework_parser.py +38 -22
  336. mindspore/profiler/parser/hccl_parser.py +16 -12
  337. mindspore/profiler/parser/integrator.py +22 -11
  338. mindspore/profiler/parser/memory_usage_parser.py +2 -2
  339. mindspore/profiler/parser/minddata_analyzer.py +12 -14
  340. mindspore/profiler/parser/minddata_pipeline_parser.py +1 -1
  341. mindspore/profiler/parser/msadvisor_parser.py +8 -4
  342. mindspore/profiler/parser/op_intermediate_parser.py +5 -2
  343. mindspore/profiler/parser/optime_parser.py +1 -1
  344. mindspore/profiler/parser/profiler_info.py +21 -2
  345. mindspore/profiler/parser/step_trace_parser.py +11 -14
  346. mindspore/profiler/profiling.py +179 -89
  347. mindspore/rewrite/api/node.py +102 -19
  348. mindspore/rewrite/api/node_type.py +5 -1
  349. mindspore/rewrite/api/pattern_engine.py +1 -1
  350. mindspore/rewrite/api/scoped_value.py +9 -17
  351. mindspore/rewrite/api/symbol_tree.py +131 -47
  352. mindspore/rewrite/ast_helpers/__init__.py +2 -1
  353. mindspore/rewrite/ast_helpers/ast_finder.py +129 -0
  354. mindspore/rewrite/ast_helpers/ast_modifier.py +116 -104
  355. mindspore/rewrite/ast_transformers/flatten_recursive_stmt.py +93 -46
  356. mindspore/rewrite/common/rewrite_elog.py +5 -1
  357. mindspore/rewrite/namer.py +33 -24
  358. mindspore/rewrite/namespace.py +14 -5
  359. mindspore/{_extends/graph_kernel/expanders/complex → rewrite/node}/__init__.py +9 -9
  360. mindspore/rewrite/node/call_function.py +79 -0
  361. mindspore/rewrite/node/cell_container.py +135 -0
  362. mindspore/rewrite/node/control_flow.py +88 -0
  363. mindspore/rewrite/{node.py → node/node.py} +273 -234
  364. mindspore/rewrite/node/node_manager.py +254 -0
  365. mindspore/rewrite/{topological_manager.py → node/node_topological_manager.py} +13 -46
  366. mindspore/rewrite/parsers/arguments_parser.py +22 -21
  367. mindspore/rewrite/parsers/assign_parser.py +216 -221
  368. mindspore/rewrite/parsers/attribute_parser.py +9 -7
  369. mindspore/rewrite/parsers/class_def_parser.py +174 -113
  370. mindspore/rewrite/parsers/constant_parser.py +9 -6
  371. mindspore/rewrite/parsers/container_parser.py +9 -7
  372. mindspore/rewrite/parsers/for_parser.py +42 -21
  373. mindspore/rewrite/parsers/function_def_parser.py +24 -16
  374. mindspore/rewrite/parsers/if_parser.py +28 -24
  375. mindspore/rewrite/parsers/module_parser.py +196 -25
  376. mindspore/rewrite/{parser.py → parsers/parser.py} +4 -2
  377. mindspore/rewrite/{parser_register.py → parsers/parser_register.py} +1 -1
  378. mindspore/rewrite/parsers/return_parser.py +6 -6
  379. mindspore/rewrite/sparsify/sparse_transformer.py +12 -3
  380. mindspore/rewrite/sparsify/utils.py +1 -1
  381. mindspore/rewrite/symbol_tree.py +523 -578
  382. mindspore/rewrite/symbol_tree_builder.py +9 -193
  383. mindspore/rewrite/symbol_tree_dumper.py +2 -2
  384. mindspore/run_check/_check_version.py +6 -4
  385. mindspore/{ops/bprop_mindir → safeguard}/__init__.py +4 -3
  386. mindspore/safeguard/rewrite_obfuscation.py +541 -0
  387. mindspore/tbbmalloc.dll +0 -0
  388. mindspore/tinyxml2.dll +0 -0
  389. mindspore/train/_utils.py +7 -3
  390. mindspore/train/amp.py +323 -123
  391. mindspore/train/anf_ir_pb2.py +14 -2
  392. mindspore/train/callback/_backup_and_restore.py +2 -12
  393. mindspore/train/callback/_callback.py +29 -4
  394. mindspore/train/callback/_checkpoint.py +23 -8
  395. mindspore/train/callback/_early_stop.py +2 -2
  396. mindspore/train/callback/_landscape.py +4 -4
  397. mindspore/train/callback/_loss_monitor.py +2 -2
  398. mindspore/train/callback/_on_request_exit.py +2 -2
  399. mindspore/train/callback/_reduce_lr_on_plateau.py +3 -4
  400. mindspore/train/callback/_summary_collector.py +15 -8
  401. mindspore/train/callback/_time_monitor.py +58 -5
  402. mindspore/train/data_sink.py +5 -11
  403. mindspore/train/dataset_helper.py +84 -57
  404. mindspore/train/loss_scale_manager.py +2 -2
  405. mindspore/train/metrics/__init__.py +3 -3
  406. mindspore/train/metrics/cosine_similarity.py +1 -1
  407. mindspore/train/metrics/hausdorff_distance.py +3 -2
  408. mindspore/train/metrics/mean_surface_distance.py +3 -2
  409. mindspore/train/metrics/metric.py +39 -19
  410. mindspore/train/metrics/roc.py +2 -2
  411. mindspore/train/metrics/root_mean_square_surface_distance.py +4 -3
  412. mindspore/train/mind_ir_pb2.py +85 -36
  413. mindspore/train/model.py +187 -47
  414. mindspore/train/serialization.py +487 -161
  415. mindspore/train/summary/_summary_adapter.py +1 -1
  416. mindspore/train/summary/_writer_pool.py +3 -2
  417. mindspore/train/summary/summary_record.py +37 -17
  418. mindspore/train/train_thor/convert_utils.py +3 -3
  419. mindspore/train/train_thor/dataset_helper.py +1 -1
  420. mindspore/turbojpeg.dll +0 -0
  421. mindspore/vcmeta.dll +0 -0
  422. mindspore/vcruntime140.dll +0 -0
  423. mindspore/vcruntime140_1.dll +0 -0
  424. mindspore/version.py +1 -1
  425. {mindspore-2.1.0.dist-info → mindspore-2.2.11.dist-info}/METADATA +7 -4
  426. {mindspore-2.1.0.dist-info → mindspore-2.2.11.dist-info}/RECORD +429 -486
  427. mindspore/_extends/graph_kernel/expander.py +0 -80
  428. mindspore/_extends/graph_kernel/expanders/__init__.py +0 -54
  429. mindspore/_extends/graph_kernel/expanders/_utils.py +0 -269
  430. mindspore/_extends/graph_kernel/expanders/addn.py +0 -33
  431. mindspore/_extends/graph_kernel/expanders/batchnorm.py +0 -152
  432. mindspore/_extends/graph_kernel/expanders/batchnorm_grad.py +0 -105
  433. mindspore/_extends/graph_kernel/expanders/clip_by_norm_no_div_sum.py +0 -33
  434. mindspore/_extends/graph_kernel/expanders/complex/abs.py +0 -30
  435. mindspore/_extends/graph_kernel/expanders/complex/add.py +0 -44
  436. mindspore/_extends/graph_kernel/expanders/complex/div.py +0 -62
  437. mindspore/_extends/graph_kernel/expanders/complex/mul.py +0 -52
  438. mindspore/_extends/graph_kernel/expanders/complex/real_div.py +0 -62
  439. mindspore/_extends/graph_kernel/expanders/complex/sub.py +0 -45
  440. mindspore/_extends/graph_kernel/expanders/conv2d.py +0 -200
  441. mindspore/_extends/graph_kernel/expanders/dropout_grad.py +0 -30
  442. mindspore/_extends/graph_kernel/expanders/equal_count.py +0 -50
  443. mindspore/_extends/graph_kernel/expanders/erfc.py +0 -35
  444. mindspore/_extends/graph_kernel/expanders/expand_dims.py +0 -50
  445. mindspore/_extends/graph_kernel/expanders/fused_adam.py +0 -44
  446. mindspore/_extends/graph_kernel/expanders/fused_adam_weight_decay.py +0 -47
  447. mindspore/_extends/graph_kernel/expanders/fused_mul_add.py +0 -28
  448. mindspore/_extends/graph_kernel/expanders/gelu_grad.py +0 -70
  449. mindspore/_extends/graph_kernel/expanders/gkdropout.py +0 -40
  450. mindspore/_extends/graph_kernel/expanders/identity.py +0 -25
  451. mindspore/_extends/graph_kernel/expanders/layernorm.py +0 -93
  452. mindspore/_extends/graph_kernel/expanders/layernorm_grad.py +0 -113
  453. mindspore/_extends/graph_kernel/expanders/logsoftmax.py +0 -46
  454. mindspore/_extends/graph_kernel/expanders/logsoftmax_grad.py +0 -36
  455. mindspore/_extends/graph_kernel/expanders/matmul.py +0 -80
  456. mindspore/_extends/graph_kernel/expanders/maximum_grad.py +0 -59
  457. mindspore/_extends/graph_kernel/expanders/minimum_grad.py +0 -80
  458. mindspore/_extends/graph_kernel/expanders/oneslike.py +0 -26
  459. mindspore/_extends/graph_kernel/expanders/reduce_mean.py +0 -43
  460. mindspore/_extends/graph_kernel/expanders/relu_grad.py +0 -32
  461. mindspore/_extends/graph_kernel/expanders/sigmoid_cross_entropy_with_logits.py +0 -41
  462. mindspore/_extends/graph_kernel/expanders/sigmoid_cross_entropy_with_logits_grad.py +0 -35
  463. mindspore/_extends/graph_kernel/expanders/sigmoid_grad.py +0 -31
  464. mindspore/_extends/graph_kernel/expanders/slice.py +0 -35
  465. mindspore/_extends/graph_kernel/expanders/softmax_cross_entropy_with_logits.py +0 -42
  466. mindspore/_extends/graph_kernel/expanders/softmax_grad_ext.py +0 -41
  467. mindspore/_extends/graph_kernel/expanders/softsign.py +0 -28
  468. mindspore/_extends/graph_kernel/expanders/sqrt_grad.py +0 -29
  469. mindspore/_extends/graph_kernel/expanders/square_sum_all.py +0 -44
  470. mindspore/_extends/graph_kernel/expanders/square_sum_v1.py +0 -37
  471. mindspore/_extends/graph_kernel/expanders/squared_difference.py +0 -43
  472. mindspore/_extends/graph_kernel/expanders/tanh_grad.py +0 -31
  473. mindspore/_extends/graph_kernel/model/op_infer.py +0 -506
  474. mindspore/dataset/datapreprocess/__init__.py +0 -20
  475. mindspore/dataset/datapreprocess/preprocess_imagenet_validate_dataset.py +0 -54
  476. mindspore/include/api/net.h +0 -142
  477. mindspore/nn/lr_scheduler.py +0 -262
  478. mindspore/ops/_grad_experimental/grad_image_ops.py +0 -248
  479. mindspore/ops/_grad_experimental/grad_linalg_ops.py +0 -181
  480. mindspore/ops/_grad_experimental/grad_other_ops.py +0 -72
  481. mindspore/ops/_grad_experimental/grad_scalar_ops.py +0 -112
  482. mindspore/ops/_grad_experimental/grad_sequence_ops.py +0 -351
  483. mindspore/ops/_op_impl/_custom_op/flash_attention/__init__.py +0 -0
  484. mindspore/ops/_op_impl/_custom_op/flash_attention/attention.py +0 -350
  485. mindspore/ops/_op_impl/_custom_op/flash_attention/flash_attention_bwd.py +0 -409
  486. mindspore/ops/_op_impl/_custom_op/flash_attention/flash_attention_fwd.py +0 -578
  487. mindspore/ops/_op_impl/_custom_op/flash_attention/flash_attention_impl.py +0 -199
  488. mindspore/ops/_op_impl/_custom_op/flash_attention/tik_ops_utils.py +0 -446
  489. mindspore/ops/_op_impl/_custom_op/flash_attention/tiling_strategy/__init__.py +0 -0
  490. mindspore/ops/_op_impl/_custom_op/flash_attention/tiling_strategy/sparse_tiling.py +0 -45
  491. mindspore/ops/_op_impl/_custom_op/flash_attention/tiling_strategy/strategy.py +0 -67
  492. mindspore/ops/_op_impl/_custom_op/flash_attention/tiling_strategy/wukong_tiling.py +0 -62
  493. mindspore/ops/bprop_mindir/BNTrainingReduce_bprop.mindir +0 -0
  494. mindspore/ops/bprop_mindir/Broadcast_bprop.mindir +0 -0
  495. mindspore/ops/bprop_mindir/Depend_bprop.mindir +0 -0
  496. mindspore/ops/bprop_mindir/DepthwiseConv2dNative_bprop.mindir +0 -138
  497. mindspore/ops/bprop_mindir/EmbeddingLookup_bprop.mindir +0 -0
  498. mindspore/ops/bprop_mindir/Load_bprop.mindir +0 -0
  499. mindspore/ops/bprop_mindir/ScatterNonAliasingAdd_bprop.mindir +0 -0
  500. mindspore/ops/bprop_mindir/SparseGatherV2_bprop.mindir +0 -0
  501. mindspore/ops/bprop_mindir/SparseSoftmaxCrossEntropyWithLogits_bprop.mindir +0 -0
  502. mindspore/ops/bprop_mindir/Switch_bprop.mindir +0 -0
  503. mindspore/ops/bprop_mindir/TransShape_bprop.mindir +0 -0
  504. mindspore/ops/bprop_mindir/TupleGetItem_bprop.mindir +0 -0
  505. mindspore/ops/bprop_mindir/Unique_bprop.mindir +0 -0
  506. mindspore/ops/bprop_mindir/Unstack_bprop.mindir +0 -0
  507. mindspore/ops/bprop_mindir/generate_mindir.py +0 -114
  508. mindspore/rewrite/node_visitor.py +0 -44
  509. {mindspore-2.1.0.dist-info → mindspore-2.2.11.dist-info}/WHEEL +0 -0
  510. {mindspore-2.1.0.dist-info → mindspore-2.2.11.dist-info}/entry_points.txt +0 -0
  511. {mindspore-2.1.0.dist-info → mindspore-2.2.11.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
1
- # Copyright 2019-2022 Huawei Technologies Co., Ltd
1
+ # Copyright 2019-2023 Huawei Technologies Co., Ltd
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -156,37 +156,13 @@ class Caltech101Dataset(GeneratorDataset):
156
156
 
157
157
  Tutorial Examples:
158
158
  - `Load & Process Data With Dataset Pipeline
159
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
159
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
160
160
 
161
161
  Note:
162
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
163
- The table below shows what input arguments are allowed and their expected behavior.
164
-
165
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
166
- :widths: 25 25 50
167
- :header-rows: 1
168
-
169
- * - Parameter `sampler`
170
- - Parameter `shuffle`
171
- - Expected Order Behavior
172
- * - None
173
- - None
174
- - random order
175
- * - None
176
- - True
177
- - random order
178
- * - None
179
- - False
180
- - sequential order
181
- * - Sampler object
182
- - None
183
- - order defined by sampler
184
- * - Sampler object
185
- - True
186
- - not allowed
187
- * - Sampler object
188
- - False
189
- - not allowed
162
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
163
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
164
+
165
+ .. include:: mindspore.dataset.sampler.txt
190
166
 
191
167
  Examples:
192
168
  >>> import mindspore.dataset as ds
@@ -311,7 +287,7 @@ class Caltech256Dataset(MappableDataset, VisionBaseDataset):
311
287
  shard_id (int, optional): The shard ID within `num_shards` . Default: ``None`` . This
312
288
  argument can only be specified when `num_shards` is also specified.
313
289
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
314
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
290
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
315
291
  Default: ``None`` , which means no cache is used.
316
292
 
317
293
  Raises:
@@ -326,37 +302,13 @@ class Caltech256Dataset(MappableDataset, VisionBaseDataset):
326
302
 
327
303
  Tutorial Examples:
328
304
  - `Load & Process Data With Dataset Pipeline
329
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
305
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
330
306
 
331
307
  Note:
332
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
333
- The table below shows what input arguments are allowed and their expected behavior.
334
-
335
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
336
- :widths: 25 25 50
337
- :header-rows: 1
338
-
339
- * - Parameter `sampler`
340
- - Parameter `shuffle`
341
- - Expected Order Behavior
342
- * - None
343
- - None
344
- - random order
345
- * - None
346
- - True
347
- - random order
348
- * - None
349
- - False
350
- - sequential order
351
- * - Sampler object
352
- - None
353
- - order defined by sampler
354
- * - Sampler object
355
- - True
356
- - not allowed
357
- * - Sampler object
358
- - False
359
- - not allowed
308
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
309
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
310
+
311
+ .. include:: mindspore.dataset.sampler.txt
360
312
 
361
313
  Examples:
362
314
  >>> import mindspore.dataset as ds
@@ -447,7 +399,7 @@ class CelebADataset(MappableDataset, VisionBaseDataset):
447
399
  shard_id (int, optional): The shard ID within `num_shards` . Default: ``None`` . This
448
400
  argument can only be specified when `num_shards` is also specified.
449
401
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
450
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
402
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
451
403
  Default: ``None`` , which means no cache is used.
452
404
  decrypt (callable, optional): Image decryption function, which accepts the path of the encrypted image file
453
405
  and returns the decrypted bytes data. Default: ``None`` , no decryption.
@@ -464,37 +416,13 @@ class CelebADataset(MappableDataset, VisionBaseDataset):
464
416
 
465
417
  Tutorial Examples:
466
418
  - `Load & Process Data With Dataset Pipeline
467
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
419
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
468
420
 
469
421
  Note:
470
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
471
- The table below shows what input arguments are allowed and their expected behavior.
472
-
473
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
474
- :widths: 25 25 50
475
- :header-rows: 1
476
-
477
- * - Parameter `sampler`
478
- - Parameter `shuffle`
479
- - Expected Order Behavior
480
- * - None
481
- - None
482
- - random order
483
- * - None
484
- - True
485
- - random order
486
- * - None
487
- - False
488
- - sequential order
489
- * - Sampler object
490
- - None
491
- - order defined by sampler
492
- * - Sampler object
493
- - True
494
- - not allowed
495
- * - Sampler object
496
- - False
497
- - not allowed
422
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
423
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
424
+
425
+ .. include:: mindspore.dataset.sampler.txt
498
426
 
499
427
  Examples:
500
428
  >>> import mindspore.dataset as ds
@@ -624,7 +552,7 @@ class Cifar10Dataset(MappableDataset, VisionBaseDataset):
624
552
  shard_id (int, optional): The shard ID within `num_shards` . Default: ``None`` . This
625
553
  argument can only be specified when `num_shards` is also specified.
626
554
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
627
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
555
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
628
556
  Default: ``None`` , which means no cache is used.
629
557
 
630
558
  Raises:
@@ -639,37 +567,13 @@ class Cifar10Dataset(MappableDataset, VisionBaseDataset):
639
567
 
640
568
  Tutorial Examples:
641
569
  - `Load & Process Data With Dataset Pipeline
642
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
570
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
643
571
 
644
572
  Note:
645
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
646
- The table below shows what input arguments are allowed and their expected behavior.
647
-
648
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
649
- :widths: 25 25 50
650
- :header-rows: 1
651
-
652
- * - Parameter `sampler`
653
- - Parameter `shuffle`
654
- - Expected Order Behavior
655
- * - None
656
- - None
657
- - random order
658
- * - None
659
- - True
660
- - random order
661
- * - None
662
- - False
663
- - sequential order
664
- * - Sampler object
665
- - None
666
- - order defined by sampler
667
- * - Sampler object
668
- - True
669
- - not allowed
670
- * - Sampler object
671
- - False
672
- - not allowed
573
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
574
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
575
+
576
+ .. include:: mindspore.dataset.sampler.txt
673
577
 
674
578
  Examples:
675
579
  >>> import mindspore.dataset as ds
@@ -762,7 +666,7 @@ class Cifar100Dataset(MappableDataset, VisionBaseDataset):
762
666
  shard_id (int, optional): The shard ID within `num_shards` . Default: ``None`` . This
763
667
  argument can only be specified when `num_shards` is also specified.
764
668
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
765
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
669
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
766
670
  Default: ``None`` , which means no cache is used.
767
671
 
768
672
  Raises:
@@ -777,37 +681,13 @@ class Cifar100Dataset(MappableDataset, VisionBaseDataset):
777
681
 
778
682
  Tutorial Examples:
779
683
  - `Load & Process Data With Dataset Pipeline
780
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
684
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
781
685
 
782
686
  Note:
783
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
784
- The table below shows what input arguments are allowed and their expected behavior.
785
-
786
- .. list-table:: Expected Order Behavior of Using `sampler` and shuffle
787
- :widths: 25 25 50
788
- :header-rows: 1
789
-
790
- * - Parameter `sampler`
791
- - Parameter `shuffle`
792
- - Expected Order Behavior
793
- * - None
794
- - None
795
- - random order
796
- * - None
797
- - True
798
- - random order
799
- * - None
800
- - False
801
- - sequential order
802
- * - Sampler object
803
- - None
804
- - order defined by sampler
805
- * - Sampler object
806
- - True
807
- - not allowed
808
- * - Sampler object
809
- - False
810
- - not allowed
687
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
688
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
689
+
690
+ .. include:: mindspore.dataset.sampler.txt
811
691
 
812
692
  Examples:
813
693
  >>> import mindspore.dataset as ds
@@ -900,7 +780,7 @@ class CityscapesDataset(MappableDataset, VisionBaseDataset):
900
780
  shard_id (int, optional): The shard ID within `num_shards` . Default: ``None`` . This
901
781
  argument can only be specified when `num_shards` is also specified.
902
782
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
903
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
783
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
904
784
  Default: ``None`` , which means no cache is used.
905
785
 
906
786
  Raises:
@@ -918,37 +798,13 @@ class CityscapesDataset(MappableDataset, VisionBaseDataset):
918
798
 
919
799
  Tutorial Examples:
920
800
  - `Load & Process Data With Dataset Pipeline
921
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
801
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
922
802
 
923
803
  Note:
924
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
925
- The table below shows what input arguments are allowed and their expected behavior.
926
-
927
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
928
- :widths: 25 25 50
929
- :header-rows: 1
930
-
931
- * - Parameter `sampler`
932
- - Parameter `shuffle`
933
- - Expected Order Behavior
934
- * - None
935
- - None
936
- - random order
937
- * - None
938
- - True
939
- - random order
940
- * - None
941
- - False
942
- - sequential order
943
- * - Sampler object
944
- - None
945
- - order defined by sampler
946
- * - Sampler object
947
- - True
948
- - not allowed
949
- * - Sampler object
950
- - False
951
- - not allowed
804
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
805
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
806
+
807
+ .. include:: mindspore.dataset.sampler.txt
952
808
 
953
809
  Examples:
954
810
  >>> import mindspore.dataset as ds
@@ -1075,7 +931,7 @@ class CocoDataset(MappableDataset, VisionBaseDataset):
1075
931
  shard_id (int, optional): The shard ID within `num_shards` . Default: ``None`` . This
1076
932
  argument can only be specified when `num_shards` is also specified.
1077
933
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
1078
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
934
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
1079
935
  Default: ``None`` , which means no cache is used.
1080
936
  extra_metadata(bool, optional): Flag to add extra meta-data to row. If True, an additional column will be
1081
937
  output at the end :py:obj:`[_meta-filename, dtype=string]` . Default: ``False``.
@@ -1134,40 +990,16 @@ class CocoDataset(MappableDataset, VisionBaseDataset):
1134
990
 
1135
991
  Tutorial Examples:
1136
992
  - `Load & Process Data With Dataset Pipeline
1137
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
993
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
1138
994
 
1139
995
  Note:
1140
996
  - Column '[_meta-filename, dtype=string]' won't be output unless an explicit rename dataset op is added
1141
997
  to remove the prefix('_meta-').
1142
998
  - Not support :class:`mindspore.dataset.PKSampler` for `sampler` parameter yet.
1143
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
1144
- The table below shows what input arguments are allowed and their expected behavior.
1145
-
1146
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
1147
- :widths: 25 25 50
1148
- :header-rows: 1
1149
-
1150
- * - Parameter `sampler`
1151
- - Parameter `shuffle`
1152
- - Expected Order Behavior
1153
- * - None
1154
- - None
1155
- - random order
1156
- * - None
1157
- - True
1158
- - random order
1159
- * - None
1160
- - False
1161
- - sequential order
1162
- * - Sampler object
1163
- - None
1164
- - order defined by sampler
1165
- * - Sampler object
1166
- - True
1167
- - not allowed
1168
- * - Sampler object
1169
- - False
1170
- - not allowed
999
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
1000
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
1001
+
1002
+ .. include:: mindspore.dataset.sampler.txt
1171
1003
 
1172
1004
  Examples:
1173
1005
  >>> import mindspore.dataset as ds
@@ -1275,10 +1107,14 @@ class CocoDataset(MappableDataset, VisionBaseDataset):
1275
1107
 
1276
1108
  def get_class_indexing(self):
1277
1109
  """
1278
- Get the class index.
1110
+ Get the mapping dictionary from category names to category indexes.
1111
+
1112
+ This dictionary can be used to look up which category name corresponds to a particular category index.
1279
1113
 
1280
1114
  Returns:
1281
- dict, a str-to-list<int> mapping from label name to index.
1115
+ Dict[str, List[int]], the mappings from category names to category index list. The first
1116
+ element of the list is always the category ID. Only in Panoptic tasks, the second element
1117
+ of the list indicates whether the category is a thing or a stuff.
1282
1118
 
1283
1119
  Examples:
1284
1120
  >>> import mindspore.dataset as ds
@@ -1333,7 +1169,7 @@ class DIV2KDataset(MappableDataset, VisionBaseDataset):
1333
1169
  shard_id (int, optional): The shard ID within `num_shards` . Default: ``None`` . This
1334
1170
  argument can only be specified when `num_shards` is also specified.
1335
1171
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
1336
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
1172
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
1337
1173
  Default: ``None`` , which means no cache is used.
1338
1174
 
1339
1175
  Raises:
@@ -1354,37 +1190,13 @@ class DIV2KDataset(MappableDataset, VisionBaseDataset):
1354
1190
 
1355
1191
  Tutorial Examples:
1356
1192
  - `Load & Process Data With Dataset Pipeline
1357
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
1193
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
1358
1194
 
1359
1195
  Note:
1360
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
1361
- The table below shows what input arguments are allowed and their expected behavior.
1362
-
1363
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
1364
- :widths: 25 25 50
1365
- :header-rows: 1
1366
-
1367
- * - Parameter `sampler`
1368
- - Parameter `shuffle`
1369
- - Expected Order Behavior
1370
- * - None
1371
- - None
1372
- - random order
1373
- * - None
1374
- - True
1375
- - random order
1376
- * - None
1377
- - False
1378
- - sequential order
1379
- * - Sampler object
1380
- - None
1381
- - order defined by sampler
1382
- * - Sampler object
1383
- - True
1384
- - not allowed
1385
- * - Sampler object
1386
- - False
1387
- - not allowed
1196
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
1197
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
1198
+
1199
+ .. include:: mindspore.dataset.sampler.txt
1388
1200
 
1389
1201
  Examples:
1390
1202
  >>> import mindspore.dataset as ds
@@ -1525,7 +1337,7 @@ class EMnistDataset(MappableDataset, VisionBaseDataset):
1525
1337
  shard_id (int, optional): The shard ID within `num_shards` . Default: ``None`` . This
1526
1338
  argument can only be specified when `num_shards` is also specified.
1527
1339
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
1528
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
1340
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
1529
1341
  Default: ``None`` , which means no cache is used.
1530
1342
 
1531
1343
  Raises:
@@ -1537,37 +1349,13 @@ class EMnistDataset(MappableDataset, VisionBaseDataset):
1537
1349
 
1538
1350
  Tutorial Examples:
1539
1351
  - `Load & Process Data With Dataset Pipeline
1540
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
1352
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
1541
1353
 
1542
1354
  Note:
1543
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
1544
- The table below shows what input arguments are allowed and their expected behavior.
1545
-
1546
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
1547
- :widths: 25 25 50
1548
- :header-rows: 1
1549
-
1550
- * - Parameter `sampler`
1551
- - Parameter `shuffle`
1552
- - Expected Order Behavior
1553
- * - None
1554
- - None
1555
- - random order
1556
- * - None
1557
- - True
1558
- - random order
1559
- * - None
1560
- - False
1561
- - sequential order
1562
- * - Sampler object
1563
- - None
1564
- - order defined by sampler
1565
- * - Sampler object
1566
- - True
1567
- - not allowed
1568
- * - Sampler object
1569
- - False
1570
- - not allowed
1355
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
1356
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
1357
+
1358
+ .. include:: mindspore.dataset.sampler.txt
1571
1359
 
1572
1360
  Examples:
1573
1361
  >>> import mindspore.dataset as ds
@@ -1664,7 +1452,7 @@ class FakeImageDataset(MappableDataset, VisionBaseDataset):
1664
1452
  shard_id (int, optional): The shard ID within `num_shards` . Default: ``None`` . This
1665
1453
  argument can only be specified when `num_shards` is also specified.
1666
1454
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
1667
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
1455
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
1668
1456
  Default: ``None`` , which means no cache is used.
1669
1457
 
1670
1458
  Raises:
@@ -1677,37 +1465,13 @@ class FakeImageDataset(MappableDataset, VisionBaseDataset):
1677
1465
 
1678
1466
  Tutorial Examples:
1679
1467
  - `Load & Process Data With Dataset Pipeline
1680
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
1468
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
1681
1469
 
1682
1470
  Note:
1683
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
1684
- The table below shows what input arguments are allowed and their expected behavior.
1685
-
1686
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
1687
- :widths: 25 25 50
1688
- :header-rows: 1
1689
-
1690
- * - Parameter 'sampler'
1691
- - Parameter 'shuffle'
1692
- - Expected Order Behavior
1693
- * - None
1694
- - None
1695
- - random order
1696
- * - None
1697
- - True
1698
- - random order
1699
- * - None
1700
- - False
1701
- - sequential order
1702
- * - Sampler object
1703
- - None
1704
- - order defined by sampler
1705
- * - Sampler object
1706
- - True
1707
- - not allowed
1708
- * - Sampler object
1709
- - False
1710
- - not allowed
1471
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
1472
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
1473
+
1474
+ .. include:: mindspore.dataset.sampler.txt
1711
1475
 
1712
1476
  Examples:
1713
1477
  >>> import mindspore.dataset as ds
@@ -1759,7 +1523,7 @@ class FashionMnistDataset(MappableDataset, VisionBaseDataset):
1759
1523
  shard_id (int, optional): The shard ID within `num_shards` . Default: ``None`` . This
1760
1524
  argument can only be specified when `num_shards` is also specified.
1761
1525
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
1762
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
1526
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
1763
1527
  Default: ``None`` , which means no cache is used.
1764
1528
 
1765
1529
  Raises:
@@ -1773,37 +1537,13 @@ class FashionMnistDataset(MappableDataset, VisionBaseDataset):
1773
1537
 
1774
1538
  Tutorial Examples:
1775
1539
  - `Load & Process Data With Dataset Pipeline
1776
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
1540
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
1777
1541
 
1778
1542
  Note:
1779
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
1780
- The table below shows what input arguments are allowed and their expected behavior.
1781
-
1782
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
1783
- :widths: 25 25 50
1784
- :header-rows: 1
1785
-
1786
- * - Parameter `sampler`
1787
- - Parameter `shuffle`
1788
- - Expected Order Behavior
1789
- * - None
1790
- - None
1791
- - random order
1792
- * - None
1793
- - True
1794
- - random order
1795
- * - None
1796
- - False
1797
- - sequential order
1798
- * - Sampler object
1799
- - None
1800
- - order defined by sampler
1801
- * - Sampler object
1802
- - True
1803
- - not allowed
1804
- * - Sampler object
1805
- - False
1806
- - not allowed
1543
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
1544
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
1545
+
1546
+ .. include:: mindspore.dataset.sampler.txt
1807
1547
 
1808
1548
  Examples:
1809
1549
  >>> import mindspore.dataset as ds
@@ -1888,7 +1628,7 @@ class FlickrDataset(MappableDataset, VisionBaseDataset):
1888
1628
  shard_id (int, optional): The shard ID within `num_shards` . Default: ``None`` . This
1889
1629
  argument can only be specified when `num_shards` is also specified.
1890
1630
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
1891
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
1631
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
1892
1632
  Default: ``None`` , which means no cache is used.
1893
1633
 
1894
1634
  Raises:
@@ -1904,37 +1644,13 @@ class FlickrDataset(MappableDataset, VisionBaseDataset):
1904
1644
 
1905
1645
  Tutorial Examples:
1906
1646
  - `Load & Process Data With Dataset Pipeline
1907
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
1647
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
1908
1648
 
1909
1649
  Note:
1910
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
1911
- The table below shows what input arguments are allowed and their expected behavior.
1912
-
1913
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
1914
- :widths: 25 25 50
1915
- :header-rows: 1
1916
-
1917
- * - Parameter `sampler`
1918
- - Parameter `shuffle`
1919
- - Expected Order Behavior
1920
- * - None
1921
- - None
1922
- - random order
1923
- * - None
1924
- - True
1925
- - random order
1926
- * - None
1927
- - False
1928
- - sequential order
1929
- * - Sampler object
1930
- - None
1931
- - order defined by sampler
1932
- * - Sampler object
1933
- - True
1934
- - not allowed
1935
- * - Sampler object
1936
- - False
1937
- - not allowed
1650
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
1651
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
1652
+
1653
+ .. include:: mindspore.dataset.sampler.txt
1938
1654
 
1939
1655
  Examples:
1940
1656
  >>> import mindspore.dataset as ds
@@ -2151,37 +1867,13 @@ class Flowers102Dataset(GeneratorDataset):
2151
1867
 
2152
1868
  Tutorial Examples:
2153
1869
  - `Load & Process Data With Dataset Pipeline
2154
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
1870
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
2155
1871
 
2156
1872
  Note:
2157
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
2158
- The table below shows what input arguments are allowed and their expected behavior.
2159
-
2160
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
2161
- :widths: 25 25 50
2162
- :header-rows: 1
2163
-
2164
- * - Parameter 'sampler'
2165
- - Parameter 'shuffle'
2166
- - Expected Order Behavior
2167
- * - None
2168
- - None
2169
- - random order
2170
- * - None
2171
- - True
2172
- - random order
2173
- * - None
2174
- - False
2175
- - sequential order
2176
- * - Sampler object
2177
- - None
2178
- - order defined by sampler
2179
- * - Sampler object
2180
- - True
2181
- - not allowed
2182
- * - Sampler object
2183
- - False
2184
- - not allowed
1873
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
1874
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
1875
+
1876
+ .. include:: mindspore.dataset.sampler.txt
2185
1877
 
2186
1878
  Examples:
2187
1879
  >>> import mindspore.dataset as ds
@@ -2309,7 +2001,7 @@ class Food101Dataset(MappableDataset, VisionBaseDataset):
2309
2001
  shard_id (int, optional): The shard ID within `num_shards` . This argument can only be specified
2310
2002
  when `num_shards` is also specified. Default: ``None`` .
2311
2003
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
2312
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
2004
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
2313
2005
  Default: ``None`` , which means no cache is used.
2314
2006
 
2315
2007
  Raises:
@@ -2325,37 +2017,13 @@ class Food101Dataset(MappableDataset, VisionBaseDataset):
2325
2017
 
2326
2018
  Tutorial Examples:
2327
2019
  - `Load & Process Data With Dataset Pipeline
2328
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
2020
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
2329
2021
 
2330
2022
  Note:
2331
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
2332
- The table below shows what input arguments are allowed and their expected behavior.
2333
-
2334
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
2335
- :widths: 25 25 50
2336
- :header-rows: 1
2337
-
2338
- * - Parameter `sampler`
2339
- - Parameter `shuffle`
2340
- - Expected Order Behavior
2341
- * - None
2342
- - None
2343
- - random order
2344
- * - None
2345
- - True
2346
- - random order
2347
- * - None
2348
- - False
2349
- - sequential order
2350
- * - Sampler object
2351
- - None
2352
- - order defined by sampler
2353
- * - Sampler object
2354
- - True
2355
- - not allowed
2356
- * - Sampler object
2357
- - False
2358
- - not allowed
2023
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
2024
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
2025
+
2026
+ .. include:: mindspore.dataset.sampler.txt
2359
2027
 
2360
2028
  Examples:
2361
2029
  >>> import mindspore.dataset as ds
@@ -2454,7 +2122,7 @@ class ImageFolderDataset(MappableDataset, VisionBaseDataset):
2454
2122
  shard_id (int, optional): The shard ID within `num_shards` . Default: ``None`` . This
2455
2123
  argument can only be specified when `num_shards` is also specified.
2456
2124
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
2457
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
2125
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
2458
2126
  Default: ``None`` , which means no cache is used.
2459
2127
  decrypt (callable, optional): Image decryption function, which accepts the path of the encrypted image file
2460
2128
  and returns the decrypted bytes data. Default: ``None`` , no decryption.
@@ -2471,38 +2139,14 @@ class ImageFolderDataset(MappableDataset, VisionBaseDataset):
2471
2139
 
2472
2140
  Tutorial Examples:
2473
2141
  - `Load & Process Data With Dataset Pipeline
2474
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
2142
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
2475
2143
 
2476
2144
  Note:
2477
2145
  - The shape of the image column is [image_size] if `decode` flag is ``False``, or [H,W,C] otherwise.
2478
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
2479
- The table below shows what input arguments are allowed and their expected behavior.
2480
-
2481
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
2482
- :widths: 25 25 50
2483
- :header-rows: 1
2484
-
2485
- * - Parameter `sampler`
2486
- - Parameter `shuffle`
2487
- - Expected Order Behavior
2488
- * - None
2489
- - None
2490
- - random order
2491
- * - None
2492
- - True
2493
- - random order
2494
- * - None
2495
- - False
2496
- - sequential order
2497
- * - Sampler object
2498
- - None
2499
- - order defined by sampler
2500
- * - Sampler object
2501
- - True
2502
- - not allowed
2503
- * - Sampler object
2504
- - False
2505
- - not allowed
2146
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
2147
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
2148
+
2149
+ .. include:: mindspore.dataset.sampler.txt
2506
2150
 
2507
2151
  Examples:
2508
2152
  >>> import mindspore.dataset as ds
@@ -2622,7 +2266,7 @@ class KITTIDataset(MappableDataset, VisionBaseDataset):
2622
2266
  shard_id (int, optional): The shard ID within `num_shards`. Default: ``None`` . This
2623
2267
  argument can only be specified when `num_shards` is also specified.
2624
2268
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
2625
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
2269
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
2626
2270
  Default: ``None`` , which means no cache is used.
2627
2271
 
2628
2272
  Raises:
@@ -2635,37 +2279,13 @@ class KITTIDataset(MappableDataset, VisionBaseDataset):
2635
2279
 
2636
2280
  Tutorial Examples:
2637
2281
  - `Load & Process Data With Dataset Pipeline
2638
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
2282
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
2639
2283
 
2640
2284
  Note:
2641
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
2642
- The table below shows what input arguments are allowed and their expected behavior.
2643
-
2644
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
2645
- :widths: 25 25 50
2646
- :header-rows: 1
2647
-
2648
- * - Parameter `sampler`
2649
- - Parameter `shuffle`
2650
- - Expected Order Behavior
2651
- * - None
2652
- - None
2653
- - random order
2654
- * - None
2655
- - True
2656
- - random order
2657
- * - None
2658
- - False
2659
- - sequential order
2660
- * - Sampler object
2661
- - None
2662
- - order defined by sampler
2663
- * - Sampler object
2664
- - True
2665
- - not allowed
2666
- * - Sampler object
2667
- - False
2668
- - not allowed
2285
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
2286
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
2287
+
2288
+ .. include:: mindspore.dataset.sampler.txt
2669
2289
 
2670
2290
  Examples:
2671
2291
  >>> import mindspore.dataset as ds
@@ -2766,7 +2386,7 @@ class KMnistDataset(MappableDataset, VisionBaseDataset):
2766
2386
  shard_id (int, optional): The shard ID within `num_shards` . Default: ``None`` . This
2767
2387
  argument can only be specified when `num_shards` is also specified.
2768
2388
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
2769
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
2389
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
2770
2390
  Default: ``None`` , which means no cache is used.
2771
2391
 
2772
2392
  Raises:
@@ -2780,37 +2400,13 @@ class KMnistDataset(MappableDataset, VisionBaseDataset):
2780
2400
 
2781
2401
  Tutorial Examples:
2782
2402
  - `Load & Process Data With Dataset Pipeline
2783
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
2403
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
2784
2404
 
2785
2405
  Note:
2786
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
2787
- The table below shows what input arguments are allowed and their expected behavior.
2788
-
2789
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
2790
- :widths: 25 25 50
2791
- :header-rows: 1
2792
-
2793
- * - Parameter `sampler`
2794
- - Parameter `shuffle`
2795
- - Expected Order Behavior
2796
- * - None
2797
- - None
2798
- - random order
2799
- * - None
2800
- - True
2801
- - random order
2802
- * - None
2803
- - False
2804
- - sequential order
2805
- * - Sampler object
2806
- - None
2807
- - order defined by sampler
2808
- * - Sampler object
2809
- - True
2810
- - not allowed
2811
- * - Sampler object
2812
- - False
2813
- - not allowed
2406
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
2407
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
2408
+
2409
+ .. include:: mindspore.dataset.sampler.txt
2814
2410
 
2815
2411
  Examples:
2816
2412
  >>> import mindspore.dataset as ds
@@ -2881,9 +2477,9 @@ class LFWDataset(MappableDataset, VisionBaseDataset):
2881
2477
  task (str, optional): Set the task type of reading lfw data, support ``'people'`` and ``'pairs'``.
2882
2478
  Default: ``None`` , means ``'people'``.
2883
2479
  usage (str, optional): The image split to use, support '``10fold'``, ``'train'``, ``'test'`` and ``'all'``.
2884
- Default: ``None`` , will read samples including train and test.
2480
+ Default: ``None`` , will read samples including ``'train'`` and ``'test'``.
2885
2481
  image_set (str, optional): Type of image funneling to use, support ``'original'``, ``'funneled'`` or
2886
- ``'deepfunneled'``. Default: ``None`` , will use 'funneled'.
2482
+ ``'deepfunneled'``. Default: ``None`` , will use ``'funneled'``.
2887
2483
  num_samples (int, optional): The number of images to be included in the dataset.
2888
2484
  Default: ``None`` , all images.
2889
2485
  num_parallel_workers (int, optional): Number of worker threads to read the data.
@@ -2900,7 +2496,7 @@ class LFWDataset(MappableDataset, VisionBaseDataset):
2900
2496
  shard_id (int, optional): The shard ID within `num_shards`. Default: ``None`` . This
2901
2497
  argument can only be specified when `num_shards` is also specified.
2902
2498
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
2903
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
2499
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
2904
2500
  Default: ``None`` , which means no cache is used.
2905
2501
 
2906
2502
  Raises:
@@ -2913,37 +2509,13 @@ class LFWDataset(MappableDataset, VisionBaseDataset):
2913
2509
 
2914
2510
  Tutorial Examples:
2915
2511
  - `Load & Process Data With Dataset Pipeline
2916
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
2512
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
2917
2513
 
2918
2514
  Note:
2919
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
2920
- The table below shows what input arguments are allowed and their expected behavior.
2921
-
2922
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
2923
- :widths: 25 25 50
2924
- :header-rows: 1
2925
-
2926
- * - Parameter 'sampler'
2927
- - Parameter 'shuffle'
2928
- - Expected Order Behavior
2929
- * - None
2930
- - None
2931
- - random order
2932
- * - None
2933
- - True
2934
- - random order
2935
- * - None
2936
- - False
2937
- - sequential order
2938
- * - Sampler object
2939
- - None
2940
- - order defined by sampler
2941
- * - Sampler object
2942
- - True
2943
- - not allowed
2944
- * - Sampler object
2945
- - False
2946
- - not allowed
2515
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
2516
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
2517
+
2518
+ .. include:: mindspore.dataset.sampler.txt
2947
2519
 
2948
2520
  Examples:
2949
2521
  >>> import mindspore.dataset as ds
@@ -3063,7 +2635,7 @@ class LSUNDataset(MappableDataset, VisionBaseDataset):
3063
2635
  shard_id (int, optional): The shard ID within `num_shards`. Default: ``None`` . This
3064
2636
  argument can only be specified when `num_shards` is also specified.
3065
2637
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
3066
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
2638
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
3067
2639
  Default: ``None`` , which means no cache is used.
3068
2640
 
3069
2641
  Raises:
@@ -3077,37 +2649,13 @@ class LSUNDataset(MappableDataset, VisionBaseDataset):
3077
2649
 
3078
2650
  Tutorial Examples:
3079
2651
  - `Load & Process Data With Dataset Pipeline
3080
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
2652
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
3081
2653
 
3082
2654
  Note:
3083
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
3084
- The table below shows what input arguments are allowed and their expected behavior.
3085
-
3086
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
3087
- :widths: 25 25 50
3088
- :header-rows: 1
3089
-
3090
- * - Parameter 'sampler'
3091
- - Parameter 'shuffle'
3092
- - Expected Order Behavior
3093
- * - None
3094
- - None
3095
- - random order
3096
- * - None
3097
- - True
3098
- - random order
3099
- * - None
3100
- - False
3101
- - sequential order
3102
- * - Sampler object
3103
- - None
3104
- - order defined by sampler
3105
- * - Sampler object
3106
- - True
3107
- - not allowed
3108
- * - Sampler object
3109
- - False
3110
- - not allowed
2655
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
2656
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
2657
+
2658
+ .. include:: mindspore.dataset.sampler.txt
3111
2659
 
3112
2660
  Examples:
3113
2661
  >>> import mindspore.dataset as ds
@@ -3208,7 +2756,7 @@ class ManifestDataset(MappableDataset, VisionBaseDataset):
3208
2756
  shard_id (int, optional): The shard ID within `num_shards` . Default: ``None`` . This
3209
2757
  argument can only be specified when `num_shards` is also specified.
3210
2758
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
3211
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
2759
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
3212
2760
  Default: ``None`` , which means no cache is used.
3213
2761
 
3214
2762
  Raises:
@@ -3223,38 +2771,15 @@ class ManifestDataset(MappableDataset, VisionBaseDataset):
3223
2771
 
3224
2772
  Tutorial Examples:
3225
2773
  - `Load & Process Data With Dataset Pipeline
3226
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
2774
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
3227
2775
 
3228
2776
  Note:
3229
- - The shape of the image column is [image_size] if `decode` flag is ``False``, or :math:`[H,W,C]` otherwise.
3230
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
3231
- The table below shows what input arguments are allowed and their expected behavior.
3232
-
3233
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
3234
- :widths: 25 25 50
3235
- :header-rows: 1
3236
-
3237
- * - Parameter `sampler`
3238
- - Parameter `shuffle`
3239
- - Expected Order Behavior
3240
- * - None
3241
- - None
3242
- - random order
3243
- * - None
3244
- - True
3245
- - random order
3246
- * - None
3247
- - False
3248
- - sequential order
3249
- * - Sampler object
3250
- - None
3251
- - order defined by sampler
3252
- * - Sampler object
3253
- - True
3254
- - not allowed
3255
- * - Sampler object
3256
- - False
3257
- - not allowed
2777
+ - If `decode` is ``False`` , the "image" column will get the 1D raw bytes of the image.
2778
+ Otherwise, a decoded image with shape :math:`[H,W,C]` will be returned.
2779
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
2780
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
2781
+
2782
+ .. include:: mindspore.dataset.sampler.txt
3258
2783
 
3259
2784
  Examples:
3260
2785
  >>> import mindspore.dataset as ds
@@ -3352,7 +2877,7 @@ class MnistDataset(MappableDataset, VisionBaseDataset):
3352
2877
  shard_id (int, optional): The shard ID within `num_shards` . Default: ``None`` . This
3353
2878
  argument can only be specified when `num_shards` is also specified.
3354
2879
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
3355
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
2880
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
3356
2881
  Default: ``None`` , which means no cache is used.
3357
2882
 
3358
2883
  Raises:
@@ -3367,37 +2892,13 @@ class MnistDataset(MappableDataset, VisionBaseDataset):
3367
2892
 
3368
2893
  Tutorial Examples:
3369
2894
  - `Load & Process Data With Dataset Pipeline
3370
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
2895
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
3371
2896
 
3372
2897
  Note:
3373
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
3374
- The table below shows what input arguments are allowed and their expected behavior.
3375
-
3376
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
3377
- :widths: 25 25 50
3378
- :header-rows: 1
3379
-
3380
- * - Parameter `sampler`
3381
- - Parameter `shuffle`
3382
- - Expected Order Behavior
3383
- * - None
3384
- - None
3385
- - random order
3386
- * - None
3387
- - True
3388
- - random order
3389
- * - None
3390
- - False
3391
- - sequential order
3392
- * - Sampler object
3393
- - None
3394
- - order defined by sampler
3395
- * - Sampler object
3396
- - True
3397
- - not allowed
3398
- * - Sampler object
3399
- - False
3400
- - not allowed
2898
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
2899
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
2900
+
2901
+ .. include:: mindspore.dataset.sampler.txt
3401
2902
 
3402
2903
  Examples:
3403
2904
  >>> import mindspore.dataset as ds
@@ -3481,7 +2982,7 @@ class OmniglotDataset(MappableDataset, VisionBaseDataset):
3481
2982
  shard_id (int, optional): The shard ID within `num_shards`. Default: ``None`` . This
3482
2983
  argument can only be specified when `num_shards` is also specified.
3483
2984
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
3484
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
2985
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
3485
2986
  Default: ``None`` , which means no cache is used.
3486
2987
 
3487
2988
  Raises:
@@ -3494,37 +2995,13 @@ class OmniglotDataset(MappableDataset, VisionBaseDataset):
3494
2995
 
3495
2996
  Tutorial Examples:
3496
2997
  - `Load & Process Data With Dataset Pipeline
3497
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
2998
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
3498
2999
 
3499
3000
  Note:
3500
- - This dataset can take in a sampler. `sampler` and `shuffle` are mutually exclusive.
3501
- The table below shows what input arguments are allowed and their expected behavior.
3502
-
3503
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
3504
- :widths: 25 25 50
3505
- :header-rows: 1
3506
-
3507
- * - Parameter `sampler`
3508
- - Parameter `shuffle`
3509
- - Expected Order Behavior
3510
- * - None
3511
- - None
3512
- - random order
3513
- * - None
3514
- - True
3515
- - random order
3516
- * - None
3517
- - False
3518
- - sequential order
3519
- * - Sampler object
3520
- - None
3521
- - order defined by sampler
3522
- * - Sampler object
3523
- - True
3524
- - not allowed
3525
- * - Sampler object
3526
- - False
3527
- - not allowed
3001
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
3002
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
3003
+
3004
+ .. include:: mindspore.dataset.sampler.txt
3528
3005
 
3529
3006
  Examples:
3530
3007
  >>> import mindspore.dataset as ds
@@ -3596,6 +3073,7 @@ class PhotoTourDataset(MappableDataset, VisionBaseDataset):
3596
3073
  PhotoTour dataset.
3597
3074
 
3598
3075
  According to the given `usage` configuration, the generated dataset has different output columns:
3076
+
3599
3077
  - `usage` = 'train', output columns: `[image, dtype=uint8]` .
3600
3078
  - `usage` ≠ 'train', output columns: `[image1, dtype=uint8]` , `[image2, dtype=uint8]` , `[matches, dtype=uint32]` .
3601
3079
 
@@ -3624,7 +3102,7 @@ class PhotoTourDataset(MappableDataset, VisionBaseDataset):
3624
3102
  shard_id (int, optional): The shard ID within `num_shards` . Default: ``None`` . This
3625
3103
  argument can only be specified when `num_shards` is also specified.
3626
3104
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
3627
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
3105
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
3628
3106
  Default: ``None`` , which means no cache is used.
3629
3107
 
3630
3108
  Raises:
@@ -3634,45 +3112,21 @@ class PhotoTourDataset(MappableDataset, VisionBaseDataset):
3634
3112
  RuntimeError: If `num_shards` is specified but `shard_id` is None.
3635
3113
  RuntimeError: If `shard_id` is specified but `num_shards` is None.
3636
3114
  ValueError: If `dataset_dir` is not exist.
3637
- ValueError: If `usage` is not ``"train"`` or ``"test"``.
3638
- ValueError: If name is not ``"notredame"``, ``"yosemite"``, ``"liberty"``,
3639
- ``"notredame_harris"``, ``"yosemite_harris"`` or ``"liberty_harris"``.
3115
+ ValueError: If `usage` is not ``'train'`` or ``'test'``.
3116
+ ValueError: If name is not ``'notredame'``, ``'yosemite'``, ``'liberty'``,
3117
+ ``'notredame_harris'``, ``'yosemite_harris'`` or ``'liberty_harris'``.
3640
3118
  ValueError: If `num_parallel_workers` exceeds the max thread numbers.
3641
3119
  ValueError: If `shard_id` is not in range of [0, `num_shards` ).
3642
3120
 
3643
3121
  Tutorial Examples:
3644
3122
  - `Load & Process Data With Dataset Pipeline
3645
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
3123
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
3646
3124
 
3647
3125
  Note:
3648
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive. The table
3649
- below shows what input arguments are allowed and their expected behavior.
3650
-
3651
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
3652
- :widths: 64 64 1
3653
- :header-rows: 1
3654
-
3655
- * - Parameter `sampler`
3656
- - Parameter `shuffle`
3657
- - Expected Order Behavior
3658
- * - None
3659
- - None
3660
- - random order
3661
- * - None
3662
- - True
3663
- - random order
3664
- * - None
3665
- - False
3666
- - sequential order
3667
- * - Sampler object
3668
- - None
3669
- - order defined by sampler
3670
- * - Sampler object
3671
- - True
3672
- - not allowed
3673
- * - Sampler object
3674
- - False
3675
- - not allowed
3126
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
3127
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
3128
+
3129
+ .. include:: mindspore.dataset.sampler.txt
3676
3130
 
3677
3131
  Examples:
3678
3132
  >>> import mindspore.dataset as ds
@@ -3776,7 +3230,7 @@ class Places365Dataset(MappableDataset, VisionBaseDataset):
3776
3230
  shard_id (int, optional): The shard ID within `num_shards` . Default: ``None`` . This
3777
3231
  argument can only be specified when `num_shards` is also specified.
3778
3232
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
3779
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
3233
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
3780
3234
  Default: ``None`` , which means no cache is used.
3781
3235
 
3782
3236
  Raises:
@@ -3791,37 +3245,13 @@ class Places365Dataset(MappableDataset, VisionBaseDataset):
3791
3245
 
3792
3246
  Tutorial Examples:
3793
3247
  - `Load & Process Data With Dataset Pipeline
3794
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
3248
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
3795
3249
 
3796
3250
  Note:
3797
- - This dataset can take in a sampler. 'sampler' and 'shuffle' are mutually exclusive.
3798
- The table below shows what input arguments are allowed and their expected behavior.
3799
-
3800
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
3801
- :widths: 25 25 50
3802
- :header-rows: 1
3803
-
3804
- * - Parameter `sampler`
3805
- - Parameter `shuffle`
3806
- - Expected Order Behavior
3807
- * - None
3808
- - None
3809
- - random order
3810
- * - None
3811
- - True
3812
- - random order
3813
- * - None
3814
- - False
3815
- - sequential order
3816
- * - Sampler object
3817
- - None
3818
- - order defined by sampler
3819
- * - Sampler object
3820
- - True
3821
- - not allowed
3822
- * - Sampler object
3823
- - False
3824
- - not allowed
3251
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
3252
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
3253
+
3254
+ .. include:: mindspore.dataset.sampler.txt
3825
3255
 
3826
3256
  Examples:
3827
3257
  >>> import mindspore.dataset as ds
@@ -3922,7 +3352,7 @@ class QMnistDataset(MappableDataset, VisionBaseDataset):
3922
3352
  shard_id (int, optional): The shard ID within `num_shards` . Default: ``None`` . This
3923
3353
  argument can only be specified when `num_shards` is also specified.
3924
3354
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
3925
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
3355
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
3926
3356
  Default: ``None`` , which means no cache is used.
3927
3357
 
3928
3358
  Raises:
@@ -3936,37 +3366,13 @@ class QMnistDataset(MappableDataset, VisionBaseDataset):
3936
3366
 
3937
3367
  Tutorial Examples:
3938
3368
  - `Load & Process Data With Dataset Pipeline
3939
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
3369
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
3940
3370
 
3941
3371
  Note:
3942
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
3943
- The table below shows what input arguments are allowed and their expected behavior.
3944
-
3945
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
3946
- :widths: 25 25 50
3947
- :header-rows: 1
3948
-
3949
- * - Parameter `sampler`
3950
- - Parameter `shuffle`
3951
- - Expected Order Behavior
3952
- * - None
3953
- - None
3954
- - random order
3955
- * - None
3956
- - True
3957
- - random order
3958
- * - None
3959
- - False
3960
- - sequential order
3961
- * - Sampler object
3962
- - None
3963
- - order defined by sampler
3964
- * - Sampler object
3965
- - True
3966
- - not allowed
3967
- * - Sampler object
3968
- - False
3969
- - not allowed
3372
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
3373
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
3374
+
3375
+ .. include:: mindspore.dataset.sampler.txt
3970
3376
 
3971
3377
  Examples:
3972
3378
  >>> import mindspore.dataset as ds
@@ -4044,7 +3450,7 @@ class RandomDataset(SourceDataset, VisionBaseDataset):
4044
3450
  Default: ``None`` , will use global default workers(8), it can be set
4045
3451
  by :func:`mindspore.dataset.config.set_num_parallel_workers` .
4046
3452
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
4047
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
3453
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
4048
3454
  Default: ``None`` , which means no cache is used.
4049
3455
  shuffle (bool, optional): Whether or not to perform shuffle on the dataset.
4050
3456
  Default: ``None`` , expected order behavior shown in the table below.
@@ -4067,7 +3473,7 @@ class RandomDataset(SourceDataset, VisionBaseDataset):
4067
3473
 
4068
3474
  Tutorial Examples:
4069
3475
  - `Load & Process Data With Dataset Pipeline
4070
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
3476
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
4071
3477
 
4072
3478
  Examples:
4073
3479
  >>> from mindspore import dtype as mstype
@@ -4129,7 +3535,7 @@ class RenderedSST2Dataset(MappableDataset, VisionBaseDataset):
4129
3535
  shard_id (int, optional): The shard ID within `num_shards` . This
4130
3536
  argument can only be specified when `num_shards` is also specified. Default: ``None`` .
4131
3537
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
4132
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
3538
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
4133
3539
  Default: ``None`` , which means no cache is used.
4134
3540
 
4135
3541
  Raises:
@@ -4144,37 +3550,13 @@ class RenderedSST2Dataset(MappableDataset, VisionBaseDataset):
4144
3550
 
4145
3551
  Tutorial Examples:
4146
3552
  - `Load & Process Data With Dataset Pipeline
4147
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
3553
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
4148
3554
 
4149
3555
  Note:
4150
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
4151
- The table below shows what input arguments are allowed and their expected behavior.
4152
-
4153
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
4154
- :widths: 25 25 50
4155
- :header-rows: 1
4156
-
4157
- * - Parameter `sampler`
4158
- - Parameter `shuffle`
4159
- - Expected Order Behavior
4160
- * - None
4161
- - None
4162
- - random order
4163
- * - None
4164
- - True
4165
- - random order
4166
- * - None
4167
- - False
4168
- - sequential order
4169
- * - Sampler object
4170
- - None
4171
- - order defined by sampler
4172
- * - Sampler object
4173
- - True
4174
- - not allowed
4175
- * - Sampler object
4176
- - False
4177
- - not allowed
3556
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
3557
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
3558
+
3559
+ .. include:: mindspore.dataset.sampler.txt
4178
3560
 
4179
3561
  Examples:
4180
3562
  >>> import mindspore.dataset as ds
@@ -4364,37 +3746,13 @@ class SBDataset(GeneratorDataset):
4364
3746
 
4365
3747
  Tutorial Examples:
4366
3748
  - `Load & Process Data With Dataset Pipeline
4367
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
3749
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
4368
3750
 
4369
3751
  Note:
4370
- - This dataset can take in a sampler. `sampler` and `shuffle` are mutually exclusive.
4371
- The table below shows what input arguments are allowed and their expected behavior.
4372
-
4373
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
4374
- :widths: 25 25 50
4375
- :header-rows: 1
4376
-
4377
- * - Parameter `sampler`
4378
- - Parameter `shuffle`
4379
- - Expected Order Behavior
4380
- * - None
4381
- - None
4382
- - random order
4383
- * - None
4384
- - True
4385
- - random order
4386
- * - None
4387
- - False
4388
- - sequential order
4389
- * - Sampler object
4390
- - None
4391
- - order defined by sampler
4392
- * - Sampler object
4393
- - True
4394
- - not allowed
4395
- * - Sampler object
4396
- - False
4397
- - not allowed
3752
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
3753
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
3754
+
3755
+ .. include:: mindspore.dataset.sampler.txt
4398
3756
 
4399
3757
  Examples:
4400
3758
  >>> import mindspore.dataset as ds
@@ -4485,7 +3843,7 @@ class SBUDataset(MappableDataset, VisionBaseDataset):
4485
3843
  shard_id (int, optional): The shard ID within `num_shards` . Default: ``None`` . This
4486
3844
  argument can only be specified when `num_shards` is also specified.
4487
3845
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
4488
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
3846
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
4489
3847
  Default: ``None`` , which means no cache is used.
4490
3848
 
4491
3849
  Raises:
@@ -4499,37 +3857,13 @@ class SBUDataset(MappableDataset, VisionBaseDataset):
4499
3857
 
4500
3858
  Tutorial Examples:
4501
3859
  - `Load & Process Data With Dataset Pipeline
4502
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
3860
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
4503
3861
 
4504
3862
  Note:
4505
- - This dataset can take in a sampler. 'sampler' and 'shuffle' are mutually exclusive.
4506
- The table below shows what input arguments are allowed and their expected behavior.
4507
-
4508
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
4509
- :widths: 25 25 50
4510
- :header-rows: 1
4511
-
4512
- * - Parameter 'sampler'
4513
- - Parameter 'shuffle'
4514
- - Expected Order Behavior
4515
- * - None
4516
- - None
4517
- - random order
4518
- * - None
4519
- - True
4520
- - random order
4521
- * - None
4522
- - False
4523
- - sequential order
4524
- * - Sampler object
4525
- - None
4526
- - order defined by sampler
4527
- * - Sampler object
4528
- - True
4529
- - not allowed
4530
- * - Sampler object
4531
- - False
4532
- - not allowed
3863
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
3864
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
3865
+
3866
+ .. include:: mindspore.dataset.sampler.txt
4533
3867
 
4534
3868
  Examples:
4535
3869
  >>> import mindspore.dataset as ds
@@ -4606,7 +3940,7 @@ class SemeionDataset(MappableDataset, VisionBaseDataset):
4606
3940
  shard_id (int, optional): The shard ID within `num_shards` . Default: ``None`` . This
4607
3941
  argument can only be specified when `num_shards` is also specified.
4608
3942
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
4609
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
3943
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
4610
3944
  Default: ``None`` , which means no cache is used.
4611
3945
 
4612
3946
  Raises:
@@ -4620,37 +3954,13 @@ class SemeionDataset(MappableDataset, VisionBaseDataset):
4620
3954
 
4621
3955
  Tutorial Examples:
4622
3956
  - `Load & Process Data With Dataset Pipeline
4623
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
3957
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
4624
3958
 
4625
3959
  Note:
4626
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
4627
- The table below shows what input arguments are allowed and their expected behavior.
4628
-
4629
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
4630
- :widths: 25 25 50
4631
- :header-rows: 1
4632
-
4633
- * - Parameter `sampler`
4634
- - Parameter `shuffle`
4635
- - Expected Order Behavior
4636
- * - None
4637
- - None
4638
- - random order
4639
- * - None
4640
- - True
4641
- - random order
4642
- * - None
4643
- - False
4644
- - sequential order
4645
- * - Sampler object
4646
- - None
4647
- - order defined by sampler
4648
- * - Sampler object
4649
- - True
4650
- - not allowed
4651
- * - Sampler object
4652
- - False
4653
- - not allowed
3960
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
3961
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
3962
+
3963
+ .. include:: mindspore.dataset.sampler.txt
4654
3964
 
4655
3965
  Examples:
4656
3966
  >>> import mindspore.dataset as ds
@@ -4740,7 +4050,7 @@ class STL10Dataset(MappableDataset, VisionBaseDataset):
4740
4050
  shard_id (int, optional): The shard ID within `num_shards` . Default: ``None`` . This
4741
4051
  argument can only be specified when `num_shards` is also specified.
4742
4052
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
4743
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
4053
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
4744
4054
  Default: ``None`` , which means no cache is used.
4745
4055
 
4746
4056
  Raises:
@@ -4755,37 +4065,13 @@ class STL10Dataset(MappableDataset, VisionBaseDataset):
4755
4065
 
4756
4066
  Tutorial Examples:
4757
4067
  - `Load & Process Data With Dataset Pipeline
4758
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
4068
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
4759
4069
 
4760
4070
  Note:
4761
- - This dataset can take in a sampler. 'sampler' and 'shuffle' are mutually exclusive.
4762
- The table below shows what input arguments are allowed and their expected behavior.
4763
-
4764
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
4765
- :widths: 25 25 50
4766
- :header-rows: 1
4767
-
4768
- * - Parameter 'sampler'
4769
- - Parameter 'shuffle'
4770
- - Expected Order Behavior
4771
- * - None
4772
- - None
4773
- - random order
4774
- * - None
4775
- - True
4776
- - random order
4777
- * - None
4778
- - False
4779
- - sequential order
4780
- * - Sampler object
4781
- - None
4782
- - order defined by sampler
4783
- * - Sampler object
4784
- - True
4785
- - not allowed
4786
- * - Sampler object
4787
- - False
4788
- - not allowed
4071
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
4072
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
4073
+
4074
+ .. include:: mindspore.dataset.sampler.txt
4789
4075
 
4790
4076
  Examples:
4791
4077
  >>> import mindspore.dataset as ds
@@ -4877,7 +4163,7 @@ class SUN397Dataset(MappableDataset, VisionBaseDataset):
4877
4163
  shard_id (int, optional): The shard ID within `num_shards` . This
4878
4164
  argument can only be specified when `num_shards` is also specified. Default: ``None`` .
4879
4165
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
4880
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
4166
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
4881
4167
  Default: ``None`` , which means no cache is used.
4882
4168
 
4883
4169
  Raises:
@@ -4891,37 +4177,13 @@ class SUN397Dataset(MappableDataset, VisionBaseDataset):
4891
4177
 
4892
4178
  Tutorial Examples:
4893
4179
  - `Load & Process Data With Dataset Pipeline
4894
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
4180
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
4895
4181
 
4896
4182
  Note:
4897
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
4898
- The table below shows what input arguments are allowed and their expected behavior.
4899
-
4900
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
4901
- :widths: 25 25 50
4902
- :header-rows: 1
4903
-
4904
- * - Parameter `sampler`
4905
- - Parameter `shuffle`
4906
- - Expected Order Behavior
4907
- * - None
4908
- - None
4909
- - random order
4910
- * - None
4911
- - True
4912
- - random order
4913
- * - None
4914
- - False
4915
- - sequential order
4916
- * - Sampler object
4917
- - None
4918
- - order defined by sampler
4919
- * - Sampler object
4920
- - True
4921
- - not allowed
4922
- * - Sampler object
4923
- - False
4924
- - not allowed
4183
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
4184
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
4185
+
4186
+ .. include:: mindspore.dataset.sampler.txt
4925
4187
 
4926
4188
  Examples:
4927
4189
  >>> import mindspore.dataset as ds
@@ -5074,37 +4336,13 @@ class SVHNDataset(GeneratorDataset):
5074
4336
 
5075
4337
  Tutorial Examples:
5076
4338
  - `Load & Process Data With Dataset Pipeline
5077
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
4339
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
5078
4340
 
5079
4341
  Note:
5080
- - This dataset can take in a sampler. 'sampler' and 'shuffle' are mutually exclusive.
5081
- The table below shows what input arguments are allowed and their expected behavior.
5082
-
5083
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
5084
- :widths: 25 25 50
5085
- :header-rows: 1
5086
-
5087
- * - Parameter 'sampler'
5088
- - Parameter 'shuffle'
5089
- - Expected Order Behavior
5090
- * - None
5091
- - None
5092
- - random order
5093
- * - None
5094
- - True
5095
- - random order
5096
- * - None
5097
- - False
5098
- - sequential order
5099
- * - Sampler object
5100
- - None
5101
- - order defined by sampler
5102
- * - Sampler object
5103
- - True
5104
- - not allowed
5105
- * - Sampler object
5106
- - False
5107
- - not allowed
4342
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
4343
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
4344
+
4345
+ .. include:: mindspore.dataset.sampler.txt
5108
4346
 
5109
4347
  Examples:
5110
4348
  >>> import mindspore.dataset as ds
@@ -5186,7 +4424,7 @@ class USPSDataset(SourceDataset, VisionBaseDataset):
5186
4424
  shard_id (int, optional): The shard ID within `num_shards` . Default: ``None`` . This
5187
4425
  argument can only be specified when `num_shards` is also specified.
5188
4426
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
5189
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
4427
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
5190
4428
  Default: ``None`` , which means no cache is used.
5191
4429
 
5192
4430
  Raises:
@@ -5199,7 +4437,7 @@ class USPSDataset(SourceDataset, VisionBaseDataset):
5199
4437
 
5200
4438
  Tutorial Examples:
5201
4439
  - `Load & Process Data With Dataset Pipeline
5202
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
4440
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
5203
4441
 
5204
4442
  Examples:
5205
4443
  >>> import mindspore.dataset as ds
@@ -5294,7 +4532,7 @@ class VOCDataset(MappableDataset, VisionBaseDataset):
5294
4532
  shard_id (int, optional): The shard ID within `num_shards` . Default: ``None`` . This
5295
4533
  argument can only be specified when `num_shards` is also specified.
5296
4534
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
5297
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
4535
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
5298
4536
  Default: ``None`` , which means no cache is used.
5299
4537
  extra_metadata(bool, optional): Flag to add extra meta-data to row. If True, an additional column named
5300
4538
  :py:obj:`[_meta-filename, dtype=string]` will be output at the end. Default: ``False``.
@@ -5318,39 +4556,15 @@ class VOCDataset(MappableDataset, VisionBaseDataset):
5318
4556
 
5319
4557
  Tutorial Examples:
5320
4558
  - `Load & Process Data With Dataset Pipeline
5321
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
4559
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
5322
4560
 
5323
4561
  Note:
5324
4562
  - Column '[_meta-filename, dtype=string]' won't be output unless an explicit rename dataset op
5325
4563
  is added to remove the prefix('_meta-').
5326
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
5327
- The table below shows what input arguments are allowed and their expected behavior.
5328
-
5329
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
5330
- :widths: 25 25 50
5331
- :header-rows: 1
5332
-
5333
- * - Parameter `sampler`
5334
- - Parameter `shuffle`
5335
- - Expected Order Behavior
5336
- * - None
5337
- - None
5338
- - random order
5339
- * - None
5340
- - True
5341
- - random order
5342
- * - None
5343
- - False
5344
- - sequential order
5345
- * - Sampler object
5346
- - None
5347
- - order defined by sampler
5348
- * - Sampler object
5349
- - True
5350
- - not allowed
5351
- * - Sampler object
5352
- - False
5353
- - not allowed
4564
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
4565
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
4566
+
4567
+ .. include:: mindspore.dataset.sampler.txt
5354
4568
 
5355
4569
  Examples:
5356
4570
  >>> import mindspore.dataset as ds
@@ -5500,7 +4714,7 @@ class WIDERFaceDataset(MappableDataset, VisionBaseDataset):
5500
4714
  shard_id (int, optional): The shard ID within `num_shards` . Default: ``None`` .
5501
4715
  This argument can only be specified when `num_shards` is also specified.
5502
4716
  cache (DatasetCache, optional): Use tensor caching service to speed up dataset processing. More details:
5503
- `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.1/dataset/cache.html>`_ .
4717
+ `Single-Node Data Cache <https://www.mindspore.cn/tutorials/experts/en/r2.2/dataset/cache.html>`_ .
5504
4718
  Default: ``None`` , which means no cache is used.
5505
4719
 
5506
4720
  Raises:
@@ -5517,37 +4731,13 @@ class WIDERFaceDataset(MappableDataset, VisionBaseDataset):
5517
4731
 
5518
4732
  Tutorial Examples:
5519
4733
  - `Load & Process Data With Dataset Pipeline
5520
- <https://www.mindspore.cn/docs/en/r2.1/api_python/samples/dataset/dataset_gallery.html>`_
4734
+ <https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
5521
4735
 
5522
4736
  Note:
5523
- - This dataset can take in a `sampler` . `sampler` and `shuffle` are mutually exclusive.
5524
- The table below shows what input arguments are allowed and their expected behavior.
5525
-
5526
- .. list-table:: Expected Order Behavior of Using `sampler` and `shuffle`
5527
- :widths: 25 25 50
5528
- :header-rows: 1
5529
-
5530
- * - Parameter `sampler`
5531
- - Parameter `shuffle`
5532
- - Expected Order Behavior
5533
- * - None
5534
- - None
5535
- - random order
5536
- * - None
5537
- - True
5538
- - random order
5539
- * - None
5540
- - False
5541
- - sequential order
5542
- * - Sampler object
5543
- - None
5544
- - order defined by sampler
5545
- * - Sampler object
5546
- - True
5547
- - not allowed
5548
- * - Sampler object
5549
- - False
5550
- - not allowed
4737
+ - The parameters `num_samples` , `shuffle` , `num_shards` , `shard_id` can be used to control the sampler
4738
+ used in the dataset, and their effects when combined with parameter `sampler` are as follows.
4739
+
4740
+ .. include:: mindspore.dataset.sampler.txt
5551
4741
 
5552
4742
  Examples:
5553
4743
  >>> import mindspore.dataset as ds