mindspore 2.1.0__cp38-cp38-manylinux1_x86_64.whl → 2.2.10__cp38-cp38-manylinux1_x86_64.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.
- mindspore/.commit_id +1 -1
- mindspore/__init__.py +4 -1
- mindspore/_akg/akg/build_module.py +5 -6
- mindspore/_akg/akg/composite/build_module.py +46 -19
- mindspore/_akg/akg/composite/split_stitch.py +10 -11
- mindspore/_akg/akg/ms/info_version_adapt.py +67 -1
- mindspore/_akg/akg/tvm/api.py +4 -3
- mindspore/_akg/akg/tvm/autotvm/__init__.py +1 -2
- mindspore/_akg/akg/tvm/autotvm/graph_tuner/base_graph_tuner.py +1 -5
- mindspore/_akg/akg/tvm/autotvm/measure/__init__.py +1 -1
- mindspore/_akg/akg/tvm/autotvm/measure/measure.py +1 -10
- mindspore/_akg/akg/tvm/autotvm/measure/measure_methods.py +1 -372
- mindspore/_akg/akg/tvm/build_module.py +16 -1
- mindspore/_akg/akg/tvm/contrib/graph_runtime.py +0 -53
- mindspore/_akg/akg/tvm/hybrid/parser.py +7 -6
- mindspore/_akg/akg/tvm/ir_builder.py +1 -1
- mindspore/_akg/akg/tvm/module.py +1 -2
- mindspore/_akg/akg/tvm/stmt.py +2 -2
- mindspore/_akg/akg/utils/ascend_profilier/__init__.py +0 -0
- mindspore/_akg/akg/utils/ascend_profilier/cann_file_parser.py +76 -0
- mindspore/_akg/akg/utils/ascend_profilier/file_manager.py +56 -0
- mindspore/_akg/akg/utils/ascend_profilier/op_summary_bean.py +23 -0
- mindspore/_akg/akg/utils/ascend_profilier/op_summary_headers.py +8 -0
- mindspore/_akg/akg/utils/ascend_profilier/op_summary_parser.py +42 -0
- mindspore/_akg/akg/utils/ascend_profilier/path_manager.py +65 -0
- mindspore/_akg/akg/utils/composite_op_helper.py +9 -10
- mindspore/_akg/akg/utils/kernel_exec.py +98 -274
- mindspore/_akg/akg/utils/result_analysis.py +4 -24
- mindspore/_akg/akg/utils/tbe_codegen_utils.py +219 -0
- mindspore/_akg/akg/utils/util.py +38 -0
- mindspore/_c_dataengine.cpython-38-x86_64-linux-gnu.so +0 -0
- mindspore/_c_expression.cpython-38-x86_64-linux-gnu.so +0 -0
- mindspore/_c_mindrecord.cpython-38-x86_64-linux-gnu.so +0 -0
- mindspore/_check_jit_forbidden_api.py +3 -1
- mindspore/_checkparam.py +23 -29
- mindspore/_extends/graph_kernel/__init__.py +0 -1
- mindspore/_extends/graph_kernel/model/graph_split.py +84 -76
- mindspore/_extends/graph_kernel/model/model_builder.py +9 -50
- mindspore/_extends/graph_kernel/splitter.py +4 -11
- mindspore/_extends/parallel_compile/akg_compiler/akg_process.py +122 -15
- mindspore/_extends/parallel_compile/akg_compiler/build_tbe_kernel.py +84 -67
- mindspore/_extends/parallel_compile/akg_compiler/tbe_topi.py +4 -2
- mindspore/_extends/parallel_compile/akg_compiler/util.py +10 -7
- mindspore/_extends/parallel_compile/tbe_compiler/tbe_adapter.py +2 -2
- mindspore/_extends/parallel_compile/tbe_compiler/tbe_helper.py +6 -5
- mindspore/_extends/parallel_compile/tbe_compiler/tbe_job.py +1 -1
- mindspore/_extends/parallel_compile/tbe_compiler/tbe_job_manager.py +1 -1
- mindspore/_extends/parse/__init__.py +12 -15
- mindspore/_extends/parse/namespace.py +7 -33
- mindspore/_extends/parse/parser.py +61 -71
- mindspore/_extends/parse/resources.py +1 -1
- mindspore/_extends/parse/standard_method.py +74 -104
- mindspore/_extends/parse/trope.py +1 -1
- mindspore/_extends/remote/kernel_build_server.py +25 -7
- mindspore/_extends/remote/kernel_build_server_akg_v2.py +55 -0
- mindspore/_install_custom.py +43 -0
- mindspore/_mindspore_offline_debug.cpython-38-x86_64-linux-gnu.so +0 -0
- mindspore/amp.py +47 -11
- mindspore/bin/cache_admin +0 -0
- mindspore/bin/cache_server +0 -0
- mindspore/boost/boost.py +1 -8
- mindspore/boost/boost_cell_wrapper.py +3 -2
- mindspore/boost/grad_accumulation.py +1 -1
- mindspore/boost/group_loss_scale_manager.py +8 -7
- mindspore/common/__init__.py +5 -3
- mindspore/common/_jit_fallback_utils.py +6 -0
- mindspore/common/_register_for_adapter.py +2 -0
- mindspore/common/_register_for_tensor.py +2 -2
- mindspore/common/_stub_tensor.py +13 -0
- mindspore/common/_utils.py +13 -0
- mindspore/common/api.py +174 -259
- mindspore/common/auto_dynamic_shape.py +494 -0
- mindspore/common/dtype.py +18 -11
- mindspore/common/dump.py +6 -4
- mindspore/common/initializer.py +14 -14
- mindspore/common/jit_config.py +33 -15
- mindspore/common/lazy_inline.py +126 -7
- mindspore/common/mindir_util.py +101 -0
- mindspore/common/parameter.py +51 -41
- mindspore/common/seed.py +4 -4
- mindspore/common/sparse_tensor.py +13 -14
- mindspore/common/tensor.py +243 -165
- mindspore/communication/__init__.py +7 -4
- mindspore/communication/_comm_helper.py +83 -4
- mindspore/communication/management.py +152 -84
- mindspore/config/op_info.config +14 -3
- mindspore/config/super_bar_config.json +4 -2
- mindspore/context.py +152 -61
- mindspore/dataset/__init__.py +5 -5
- mindspore/dataset/audio/__init__.py +2 -2
- mindspore/dataset/audio/transforms.py +52 -52
- mindspore/dataset/callback/ds_callback.py +16 -2
- mindspore/dataset/core/config.py +68 -51
- mindspore/dataset/engine/cache_client.py +28 -5
- mindspore/dataset/engine/datasets.py +250 -112
- mindspore/dataset/engine/datasets_audio.py +43 -211
- mindspore/dataset/engine/datasets_standard_format.py +16 -35
- mindspore/dataset/engine/datasets_text.py +43 -67
- mindspore/dataset/engine/datasets_user_defined.py +86 -100
- mindspore/dataset/engine/datasets_vision.py +219 -1029
- mindspore/dataset/engine/iterators.py +11 -4
- mindspore/dataset/engine/obs/obs_mindrecord_dataset.py +4 -0
- mindspore/dataset/engine/obs/util.py +3 -0
- mindspore/dataset/engine/samplers.py +1 -1
- mindspore/dataset/engine/validators.py +19 -5
- mindspore/dataset/text/__init__.py +3 -3
- mindspore/dataset/text/transforms.py +101 -127
- mindspore/dataset/text/utils.py +205 -138
- mindspore/dataset/transforms/__init__.py +1 -1
- mindspore/dataset/transforms/py_transforms_util.py +40 -12
- mindspore/dataset/transforms/transforms.py +95 -40
- mindspore/dataset/utils/browse_dataset.py +8 -2
- mindspore/dataset/utils/line_reader.py +17 -19
- mindspore/dataset/vision/__init__.py +3 -3
- mindspore/dataset/vision/c_transforms.py +6 -3
- mindspore/dataset/vision/transforms.py +409 -287
- mindspore/dataset/vision/utils.py +13 -14
- mindspore/dataset/vision/validators.py +11 -1
- mindspore/experimental/map_parameter.py +14 -0
- mindspore/{nn/optim_ex → experimental/optim}/__init__.py +30 -29
- mindspore/{nn/optim_ex → experimental/optim}/adam.py +60 -67
- mindspore/{nn/optim_ex → experimental/optim}/adamw.py +181 -203
- mindspore/experimental/optim/lr_scheduler.py +1427 -0
- mindspore/{nn/optim_ex → experimental/optim}/optimizer.py +252 -259
- mindspore/{nn/optim_ex → experimental/optim}/sgd.py +147 -152
- mindspore/gen_ops.py +273 -0
- mindspore/include/OWNERS +0 -1
- mindspore/include/api/data_type.h +2 -1
- mindspore/include/api/graph.h +0 -15
- mindspore/include/api/kernel.h +2 -0
- mindspore/include/api/kernel_api.h +37 -12
- mindspore/include/api/model.h +17 -14
- mindspore/include/api/status.h +8 -3
- mindspore/include/api/types.h +37 -4
- mindspore/include/c_api/ms/abstract.h +67 -0
- mindspore/include/c_api/ms/attribute.h +197 -0
- mindspore/include/c_api/ms/base/handle_types.h +43 -0
- mindspore/include/c_api/ms/base/macros.h +32 -0
- mindspore/include/c_api/ms/base/status.h +33 -0
- mindspore/include/c_api/ms/base/types.h +282 -0
- mindspore/include/c_api/ms/context.h +102 -0
- mindspore/include/c_api/ms/graph.h +160 -0
- mindspore/include/c_api/ms/node.h +606 -0
- mindspore/include/c_api/ms/tensor.h +161 -0
- mindspore/include/c_api/ms/value.h +84 -0
- mindspore/include/dataset/constants.h +6 -5
- mindspore/include/dataset/execute.h +23 -13
- mindspore/include/dataset/text.h +26 -26
- mindspore/include/dataset/transforms.h +13 -13
- mindspore/include/dataset/vision.h +60 -60
- mindspore/include/dataset/vision_ascend.h +5 -6
- mindspore/include/dataset/vision_lite.h +17 -17
- mindspore/include/mindapi/base/type_id.h +1 -0
- mindspore/include/mindapi/base/types.h +1 -0
- mindspore/lib/libdnnl.so.2 +0 -0
- mindspore/lib/libjemalloc.so.2 +0 -0
- mindspore/lib/libmindspore.so +0 -0
- mindspore/lib/libmindspore_backend.so +0 -0
- mindspore/lib/libmindspore_common.so +0 -0
- mindspore/lib/libmindspore_core.so +0 -0
- mindspore/lib/libmindspore_glog.so.0 +0 -0
- mindspore/lib/libmindspore_gpr.so.15 +0 -0
- mindspore/lib/libmindspore_grpc++.so.1 +0 -0
- mindspore/lib/libmindspore_grpc.so.15 +0 -0
- mindspore/lib/libmindspore_shared_lib.so +0 -0
- mindspore/lib/libnnacl.so +0 -0
- mindspore/lib/libopencv_core.so.4.5 +0 -0
- mindspore/lib/libopencv_imgcodecs.so.4.5 +0 -0
- mindspore/lib/libopencv_imgproc.so.4.5 +0 -0
- mindspore/lib/libps_cache.so +0 -0
- mindspore/lib/plugin/ascend/custom_aicore_ops/op_impl/ai_core/tbe/config/ascend310/aic-ascend310-ops-info.json +123 -0
- mindspore/lib/plugin/ascend/custom_aicore_ops/op_impl/ai_core/tbe/config/ascend310p/aic-ascend310p-ops-info.json +123 -0
- mindspore/lib/plugin/ascend/custom_aicore_ops/op_impl/ai_core/tbe/config/ascend910/aic-ascend910-ops-info.json +158 -0
- mindspore/lib/plugin/ascend/custom_aicore_ops/op_impl/ai_core/tbe/config/ascend910b/aic-ascend910b-ops-info.json +37 -0
- mindspore/lib/plugin/ascend/custom_aicore_ops/op_impl/ai_core/tbe/custom_aicore_ops_impl/add_dsl.py +46 -0
- mindspore/lib/plugin/ascend/custom_aicore_ops/op_impl/ai_core/tbe/custom_aicore_ops_impl/add_tik.py +51 -0
- mindspore/lib/plugin/ascend/custom_aicore_ops/op_impl/ai_core/tbe/custom_aicore_ops_impl/kv_cache_mgr.py +241 -0
- mindspore/lib/plugin/ascend/custom_aicore_ops/op_impl/ai_core/tbe/custom_aicore_ops_impl/matmul_tik.py +212 -0
- mindspore/lib/plugin/ascend/custom_aicore_ops/op_impl/vector_core/tbe/custom_aicore_ops_impl/add_dsl.py +46 -0
- mindspore/lib/plugin/ascend/custom_aicore_ops/op_impl/vector_core/tbe/custom_aicore_ops_impl/add_tik.py +51 -0
- mindspore/lib/plugin/ascend/custom_aicore_ops/op_impl/vector_core/tbe/custom_aicore_ops_impl/kv_cache_mgr.py +241 -0
- mindspore/lib/plugin/ascend/custom_aicore_ops/op_impl/vector_core/tbe/custom_aicore_ops_impl/matmul_tik.py +212 -0
- mindspore/lib/plugin/ascend/custom_aicore_ops/op_proto/libop_proto.so +0 -0
- mindspore/lib/plugin/ascend/custom_aicpu_ops/op_impl/cpu/aicpu_kernel/impl/libcust_aicpu_kernels.so +0 -0
- mindspore/lib/plugin/ascend/custom_aicpu_ops/op_impl/cpu/aicpu_kernel/impl/libcust_cpu_kernels.so +0 -0
- mindspore/lib/plugin/ascend/custom_aicpu_ops/op_impl/cpu/config/cust_aicpu_kernel.json +8928 -0
- mindspore/lib/plugin/ascend/custom_aicpu_ops/op_proto/libcust_op_proto.so +0 -0
- mindspore/lib/plugin/ascend/libakg.so +0 -0
- mindspore/lib/plugin/ascend/libascend_collective.so +0 -0
- mindspore/lib/plugin/ascend/libdvpp_utils.so +0 -0
- mindspore/lib/plugin/ascend/libhccl_plugin.so +0 -0
- mindspore/lib/plugin/ascend/libmindspore_aicpu_kernels.so +0 -0
- mindspore/lib/plugin/ascend/libmindspore_cpu_kernels.so +0 -0
- mindspore/lib/plugin/cpu/libakg.so +0 -0
- mindspore/lib/plugin/gpu/libcuda_ops.so.10 +0 -0
- mindspore/lib/plugin/gpu/libcuda_ops.so.11 +0 -0
- mindspore/lib/plugin/gpu10.1/libakg.so +0 -0
- mindspore/lib/plugin/gpu10.1/libnccl.so.2 +0 -0
- mindspore/lib/plugin/gpu11.1/libakg.so +0 -0
- mindspore/lib/plugin/gpu11.1/libnccl.so.2 +0 -0
- mindspore/lib/plugin/gpu11.6/libakg.so +0 -0
- mindspore/lib/plugin/gpu11.6/libnccl.so.2 +0 -0
- mindspore/lib/plugin/libmindspore_ascend.so.1 +0 -0
- mindspore/lib/plugin/libmindspore_ascend.so.2 +0 -0
- mindspore/lib/plugin/libmindspore_gpu.so.10.1 +0 -0
- mindspore/lib/plugin/libmindspore_gpu.so.11.1 +0 -0
- mindspore/lib/plugin/libmindspore_gpu.so.11.6 +0 -0
- mindspore/mindrecord/tools/imagenet_to_mr.py +1 -1
- mindspore/mindrecord/tools/mnist_to_mr.py +2 -2
- mindspore/nn/__init__.py +0 -2
- mindspore/nn/cell.py +313 -74
- mindspore/nn/dynamic_lr.py +21 -21
- mindspore/nn/layer/activation.py +22 -30
- mindspore/nn/layer/basic.py +15 -13
- mindspore/nn/layer/channel_shuffle.py +1 -1
- mindspore/nn/layer/container.py +271 -9
- mindspore/nn/layer/conv.py +323 -204
- mindspore/nn/layer/dense.py +8 -5
- mindspore/nn/layer/embedding.py +33 -27
- mindspore/nn/layer/flash_attention.py +141 -88
- mindspore/nn/layer/image.py +8 -6
- mindspore/nn/layer/math.py +16 -25
- mindspore/nn/layer/normalization.py +107 -66
- mindspore/nn/layer/padding.py +1 -1
- mindspore/nn/layer/pooling.py +131 -109
- mindspore/nn/layer/rnn_cells.py +27 -22
- mindspore/nn/layer/rnns.py +13 -16
- mindspore/nn/layer/thor_layer.py +1 -1
- mindspore/nn/layer/transformer.py +221 -154
- mindspore/nn/learning_rate_schedule.py +9 -1
- mindspore/nn/loss/loss.py +235 -174
- mindspore/nn/optim/ada_grad.py +2 -1
- mindspore/nn/optim/adadelta.py +1 -0
- mindspore/nn/optim/adafactor.py +2 -1
- mindspore/nn/optim/adam.py +7 -4
- mindspore/nn/optim/adamax.py +3 -2
- mindspore/nn/optim/adasum.py +2 -2
- mindspore/nn/optim/asgd.py +2 -3
- mindspore/nn/optim/ftrl.py +6 -5
- mindspore/nn/optim/lamb.py +7 -4
- mindspore/nn/optim/lars.py +1 -1
- mindspore/nn/optim/lazyadam.py +5 -3
- mindspore/nn/optim/momentum.py +2 -1
- mindspore/nn/optim/optimizer.py +53 -4
- mindspore/nn/optim/proximal_ada_grad.py +3 -4
- mindspore/nn/optim/rmsprop.py +4 -3
- mindspore/nn/optim/rprop.py +23 -12
- mindspore/nn/optim/sgd.py +26 -11
- mindspore/nn/optim/thor.py +9 -7
- mindspore/nn/probability/bijector/bijector.py +5 -5
- mindspore/nn/probability/bijector/power_transform.py +27 -27
- mindspore/nn/probability/bijector/softplus.py +3 -3
- mindspore/nn/probability/distribution/_utils/custom_ops.py +3 -3
- mindspore/nn/probability/distribution/bernoulli.py +5 -5
- mindspore/nn/probability/distribution/beta.py +3 -3
- mindspore/nn/probability/distribution/categorical.py +7 -7
- mindspore/nn/probability/distribution/cauchy.py +0 -1
- mindspore/nn/probability/distribution/distribution.py +3 -3
- mindspore/nn/probability/distribution/gamma.py +3 -3
- mindspore/nn/probability/distribution/geometric.py +4 -4
- mindspore/nn/probability/distribution/gumbel.py +4 -4
- mindspore/nn/probability/distribution/log_normal.py +2 -2
- mindspore/nn/probability/distribution/logistic.py +2 -2
- mindspore/nn/probability/distribution/poisson.py +4 -4
- mindspore/nn/probability/distribution/transformed_distribution.py +3 -3
- mindspore/nn/probability/distribution/uniform.py +6 -6
- mindspore/nn/wrap/cell_wrapper.py +84 -34
- mindspore/nn/wrap/grad_reducer.py +8 -5
- mindspore/nn/wrap/loss_scale.py +105 -42
- mindspore/numpy/array_creations.py +1 -2
- mindspore/numpy/array_ops.py +3 -2
- mindspore/numpy/utils_const.py +5 -5
- mindspore/offline_debug/convert_async.py +2 -2
- mindspore/ops/_grad_experimental/__init__.py +0 -5
- mindspore/ops/_grad_experimental/grad_array_ops.py +2 -3
- mindspore/ops/_grad_experimental/grad_comm_ops.py +15 -2
- mindspore/ops/_grad_experimental/grad_debug_ops.py +0 -37
- mindspore/ops/_grad_experimental/grad_implementations.py +11 -1
- mindspore/ops/_grad_experimental/grad_inner_ops.py +2 -216
- mindspore/ops/_grad_experimental/grad_math_ops.py +19 -199
- mindspore/ops/_grad_experimental/grad_sparse.py +15 -0
- mindspore/ops/_grad_experimental/grad_sparse_ops.py +3 -3
- mindspore/ops/_op_impl/_custom_op/dsd_back_impl.py +1 -1
- mindspore/ops/_op_impl/_custom_op/flash_attention/attention.py +165 -109
- mindspore/ops/_op_impl/_custom_op/flash_attention/flash_attention_bwd.py +144 -86
- mindspore/ops/_op_impl/_custom_op/flash_attention/flash_attention_fwd.py +172 -187
- mindspore/ops/_op_impl/_custom_op/flash_attention/flash_attention_impl.py +51 -57
- mindspore/ops/_op_impl/_custom_op/flash_attention/tik_ops_utils.py +6 -17
- mindspore/ops/_op_impl/_custom_op/flash_attention/tiling_strategy/wukong_tiling.py +1 -1
- mindspore/ops/_op_impl/aicpu/__init__.py +14 -2
- mindspore/ops/_op_impl/aicpu/add.py +3 -3
- mindspore/ops/_op_impl/aicpu/bias_add_grad.py +0 -1
- mindspore/ops/_op_impl/aicpu/count_nonzero.py +43 -0
- mindspore/ops/_op_impl/aicpu/eps.py +32 -0
- mindspore/ops/_op_impl/aicpu/gamma.py +2 -2
- mindspore/ops/_op_impl/aicpu/log_uniform_candidate_sampler.py +6 -3
- mindspore/ops/_op_impl/aicpu/lu_unpack_grad.py +0 -1
- mindspore/ops/_op_impl/aicpu/multinomial.py +3 -3
- mindspore/ops/_op_impl/aicpu/parameterized_truncated_normal.py +15 -7
- mindspore/ops/_op_impl/aicpu/random_categorical.py +39 -19
- mindspore/ops/_op_impl/aicpu/random_choice_with_mask.py +5 -2
- mindspore/ops/_op_impl/aicpu/random_poisson.py +103 -52
- mindspore/ops/_op_impl/aicpu/random_shuffle.py +17 -15
- mindspore/ops/_op_impl/aicpu/{sparseaddmm.py → sparse_addmm.py} +2 -2
- mindspore/ops/_op_impl/aicpu/{sparsesparsemaximum.py → sparse_sparse_maximum.py} +4 -4
- mindspore/ops/_op_impl/aicpu/standard_laplace.py +5 -5
- mindspore/ops/_op_impl/aicpu/standard_normal.py +5 -5
- mindspore/ops/_op_impl/aicpu/truncated_normal.py +9 -7
- mindspore/ops/_op_impl/aicpu/uniform.py +5 -3
- mindspore/ops/_op_impl/aicpu/uniform_candidate_sampler.py +8 -4
- mindspore/ops/_op_impl/aicpu/uniform_int.py +5 -5
- mindspore/ops/_op_impl/aicpu/uniform_real.py +4 -4
- mindspore/ops/_op_impl/tbe/__init__.py +4 -4
- mindspore/ops/_op_impl/tbe/inplace_index_add.py +7 -3
- mindspore/ops/_op_impl/tbe/trans_data_ds.py +2 -0
- mindspore/ops/_primitive_cache.py +1 -1
- mindspore/ops/_tracefunc.py +45 -13
- mindspore/ops/_utils/utils.py +6 -1
- mindspore/ops/_vmap/vmap_array_ops.py +3 -3
- mindspore/ops/_vmap/vmap_base.py +3 -3
- mindspore/ops/_vmap/vmap_convolution_ops.py +1 -1
- mindspore/ops/_vmap/vmap_grad_math_ops.py +6 -4
- mindspore/ops/_vmap/vmap_math_ops.py +5 -2
- mindspore/ops/_vmap/vmap_nn_ops.py +61 -7
- mindspore/ops/arg_dtype_cast.py +54 -0
- mindspore/ops/composite/base.py +37 -10
- mindspore/ops/composite/math_ops.py +5 -4
- mindspore/ops/composite/multitype_ops/_compile_utils.py +275 -73
- mindspore/ops/composite/multitype_ops/_constexpr_utils.py +16 -9
- mindspore/ops/composite/multitype_ops/add_impl.py +43 -4
- mindspore/ops/composite/multitype_ops/getitem_impl.py +42 -4
- mindspore/ops/composite/multitype_ops/ones_like_impl.py +6 -0
- mindspore/ops/composite/multitype_ops/setitem_impl.py +2 -1
- mindspore/ops/composite/multitype_ops/zeros_like_impl.py +9 -0
- mindspore/ops/deprecated.py +304 -0
- mindspore/ops/function/__init__.py +4 -1
- mindspore/ops/function/array_func.py +174 -193
- mindspore/ops/function/clip_func.py +81 -13
- mindspore/ops/function/debug_func.py +1 -1
- mindspore/ops/function/grad/grad_func.py +18 -9
- mindspore/ops/function/image_func.py +10 -4
- mindspore/ops/function/linalg_func.py +5 -5
- mindspore/ops/function/math_func.py +575 -386
- mindspore/ops/function/nn_func.py +568 -260
- mindspore/ops/function/random_func.py +88 -57
- mindspore/ops/function/sparse_func.py +1 -1
- mindspore/ops/function/sparse_unary_func.py +14 -12
- mindspore/ops/function/vmap_func.py +6 -5
- mindspore/ops/functional.py +15 -10
- mindspore/ops/op_info_register.py +244 -25
- mindspore/ops/operations/__init__.py +28 -19
- mindspore/ops/operations/_grad_ops.py +72 -7
- mindspore/ops/operations/_inner_ops.py +350 -17
- mindspore/ops/operations/_quant_ops.py +4 -8
- mindspore/ops/operations/_sequence_ops.py +42 -0
- mindspore/ops/operations/array_ops.py +68 -282
- mindspore/ops/operations/comm_ops.py +107 -59
- mindspore/ops/operations/custom_ops.py +94 -70
- mindspore/ops/operations/debug_ops.py +8 -4
- mindspore/ops/operations/image_ops.py +18 -12
- mindspore/ops/operations/inner_ops.py +26 -3
- mindspore/ops/operations/math_ops.py +189 -141
- mindspore/ops/operations/nn_ops.py +794 -489
- mindspore/ops/operations/other_ops.py +0 -22
- mindspore/ops/operations/random_ops.py +53 -111
- mindspore/ops/operations/sparse_ops.py +3 -1
- mindspore/ops/primitive.py +24 -18
- mindspore/parallel/_auto_parallel_context.py +68 -8
- mindspore/parallel/_cost_model_context.py +2 -2
- mindspore/parallel/_offload_context.py +17 -3
- mindspore/parallel/_parallel_serialization.py +12 -5
- mindspore/parallel/_ps_context.py +12 -0
- mindspore/parallel/_tensor.py +18 -13
- mindspore/parallel/_transformer/layers.py +5 -3
- mindspore/parallel/_transformer/loss.py +1 -0
- mindspore/parallel/_transformer/moe.py +2 -2
- mindspore/parallel/_transformer/op_parallel_config.py +12 -1
- mindspore/parallel/_transformer/transformer.py +23 -3
- mindspore/parallel/_utils.py +11 -7
- mindspore/parallel/algo_parameter_config.py +85 -5
- mindspore/parallel/checkpoint_transform.py +19 -12
- mindspore/parallel/shard.py +21 -14
- mindspore/profiler/common/struct_type.py +3 -3
- mindspore/profiler/common/util.py +4 -2
- mindspore/profiler/envprofiling.py +1 -1
- mindspore/profiler/parser/aicpu_data_parser.py +5 -3
- mindspore/profiler/parser/ascend_flops_generator.py +2 -2
- mindspore/profiler/parser/ascend_fpbp_generator.py +1 -1
- mindspore/profiler/parser/ascend_hccl_generator.py +249 -12
- mindspore/profiler/parser/ascend_msprof_exporter.py +150 -255
- mindspore/profiler/parser/ascend_msprof_generator.py +204 -17
- mindspore/profiler/parser/ascend_op_generator.py +6 -6
- mindspore/profiler/parser/ascend_steptrace_generator.py +6 -4
- mindspore/profiler/parser/ascend_timeline_generator.py +14 -187
- mindspore/profiler/parser/base_timeline_generator.py +10 -8
- mindspore/profiler/parser/cpu_gpu_timeline_generator.py +16 -12
- mindspore/profiler/parser/flops_parser.py +15 -11
- mindspore/profiler/parser/framework_parser.py +38 -22
- mindspore/profiler/parser/hccl_parser.py +16 -12
- mindspore/profiler/parser/integrator.py +22 -11
- mindspore/profiler/parser/memory_usage_parser.py +2 -2
- mindspore/profiler/parser/minddata_analyzer.py +12 -14
- mindspore/profiler/parser/minddata_pipeline_parser.py +1 -1
- mindspore/profiler/parser/msadvisor_parser.py +8 -4
- mindspore/profiler/parser/op_intermediate_parser.py +5 -2
- mindspore/profiler/parser/optime_parser.py +1 -1
- mindspore/profiler/parser/profiler_info.py +21 -2
- mindspore/profiler/parser/step_trace_parser.py +11 -14
- mindspore/profiler/profiling.py +179 -89
- mindspore/rewrite/api/node.py +102 -19
- mindspore/rewrite/api/node_type.py +5 -1
- mindspore/rewrite/api/pattern_engine.py +1 -1
- mindspore/rewrite/api/scoped_value.py +9 -17
- mindspore/rewrite/api/symbol_tree.py +131 -47
- mindspore/rewrite/ast_helpers/__init__.py +2 -1
- mindspore/rewrite/ast_helpers/ast_finder.py +129 -0
- mindspore/rewrite/ast_helpers/ast_modifier.py +116 -104
- mindspore/rewrite/ast_transformers/flatten_recursive_stmt.py +93 -46
- mindspore/rewrite/common/rewrite_elog.py +5 -1
- mindspore/rewrite/namer.py +33 -24
- mindspore/rewrite/namespace.py +14 -5
- mindspore/{_extends/graph_kernel/expanders/complex → rewrite/node}/__init__.py +9 -9
- mindspore/rewrite/node/call_function.py +79 -0
- mindspore/rewrite/node/cell_container.py +135 -0
- mindspore/rewrite/node/control_flow.py +88 -0
- mindspore/rewrite/{node.py → node/node.py} +273 -234
- mindspore/rewrite/node/node_manager.py +254 -0
- mindspore/rewrite/{topological_manager.py → node/node_topological_manager.py} +13 -46
- mindspore/rewrite/parsers/arguments_parser.py +22 -21
- mindspore/rewrite/parsers/assign_parser.py +216 -221
- mindspore/rewrite/parsers/attribute_parser.py +9 -7
- mindspore/rewrite/parsers/class_def_parser.py +174 -113
- mindspore/rewrite/parsers/constant_parser.py +9 -6
- mindspore/rewrite/parsers/container_parser.py +9 -7
- mindspore/rewrite/parsers/for_parser.py +36 -15
- mindspore/rewrite/parsers/function_def_parser.py +24 -16
- mindspore/rewrite/parsers/if_parser.py +28 -24
- mindspore/rewrite/parsers/module_parser.py +196 -25
- mindspore/rewrite/{parser.py → parsers/parser.py} +4 -2
- mindspore/rewrite/{parser_register.py → parsers/parser_register.py} +1 -1
- mindspore/rewrite/parsers/return_parser.py +6 -6
- mindspore/rewrite/sparsify/sparse_transformer.py +12 -3
- mindspore/rewrite/sparsify/utils.py +1 -1
- mindspore/rewrite/symbol_tree.py +523 -578
- mindspore/rewrite/symbol_tree_builder.py +9 -193
- mindspore/rewrite/symbol_tree_dumper.py +2 -2
- mindspore/run_check/_check_version.py +6 -4
- mindspore/{ops/bprop_mindir → safeguard}/__init__.py +4 -3
- mindspore/safeguard/rewrite_obfuscation.py +541 -0
- mindspore/scipy/linalg.py +1 -1
- mindspore/scipy/optimize/minimize.py +7 -3
- mindspore/train/_utils.py +7 -3
- mindspore/train/amp.py +323 -123
- mindspore/train/anf_ir_pb2.py +14 -2
- mindspore/train/callback/_backup_and_restore.py +2 -12
- mindspore/train/callback/_callback.py +29 -4
- mindspore/train/callback/_checkpoint.py +23 -8
- mindspore/train/callback/_early_stop.py +2 -2
- mindspore/train/callback/_landscape.py +4 -4
- mindspore/train/callback/_loss_monitor.py +2 -2
- mindspore/train/callback/_on_request_exit.py +2 -2
- mindspore/train/callback/_reduce_lr_on_plateau.py +3 -4
- mindspore/train/callback/_summary_collector.py +15 -8
- mindspore/train/callback/_time_monitor.py +58 -5
- mindspore/train/data_sink.py +5 -11
- mindspore/train/dataset_helper.py +84 -57
- mindspore/train/loss_scale_manager.py +2 -2
- mindspore/train/metrics/__init__.py +3 -3
- mindspore/train/metrics/cosine_similarity.py +1 -1
- mindspore/train/metrics/hausdorff_distance.py +3 -2
- mindspore/train/metrics/mean_surface_distance.py +3 -2
- mindspore/train/metrics/metric.py +39 -19
- mindspore/train/metrics/roc.py +2 -2
- mindspore/train/metrics/root_mean_square_surface_distance.py +4 -3
- mindspore/train/mind_ir_pb2.py +85 -36
- mindspore/train/model.py +187 -47
- mindspore/train/serialization.py +487 -161
- mindspore/train/summary/_summary_adapter.py +1 -1
- mindspore/train/summary/_writer_pool.py +3 -2
- mindspore/train/summary/summary_record.py +37 -17
- mindspore/train/train_thor/convert_utils.py +3 -3
- mindspore/train/train_thor/dataset_helper.py +1 -1
- mindspore/version.py +1 -1
- {mindspore-2.1.0.dist-info → mindspore-2.2.10.dist-info}/METADATA +6 -7
- {mindspore-2.1.0.dist-info → mindspore-2.2.10.dist-info}/RECORD +488 -528
- {mindspore-2.1.0.dist-info → mindspore-2.2.10.dist-info}/entry_points.txt +0 -1
- mindspore/_akg/akg/tvm/contrib/debugger/__init__.py +0 -16
- mindspore/_akg/akg/tvm/contrib/debugger/debug_result.py +0 -274
- mindspore/_akg/akg/tvm/contrib/debugger/debug_runtime.py +0 -259
- mindspore/_akg/akg/tvm/contrib/peak.py +0 -341
- mindspore/_akg/akg/tvm/contrib/rpc.py +0 -25
- mindspore/_akg/akg/tvm/contrib/xcode.py +0 -257
- mindspore/_akg/akg/tvm/exec/__init__.py +0 -17
- mindspore/_akg/akg/tvm/exec/autotvm_log_editor.py +0 -60
- mindspore/_akg/akg/tvm/exec/measure_peak.py +0 -48
- mindspore/_akg/akg/tvm/exec/query_rpc_tracker.py +0 -48
- mindspore/_akg/akg/tvm/exec/rpc_proxy.py +0 -98
- mindspore/_akg/akg/tvm/exec/rpc_server.py +0 -88
- mindspore/_akg/akg/tvm/exec/rpc_tracker.py +0 -62
- mindspore/_akg/akg/tvm/rpc/__init__.py +0 -29
- mindspore/_akg/akg/tvm/rpc/base.py +0 -182
- mindspore/_akg/akg/tvm/rpc/client.py +0 -436
- mindspore/_akg/akg/tvm/rpc/proxy.py +0 -595
- mindspore/_akg/akg/tvm/rpc/server.py +0 -413
- mindspore/_akg/akg/tvm/rpc/tornado_util.py +0 -121
- mindspore/_akg/akg/tvm/rpc/tracker.py +0 -431
- mindspore/_extends/graph_kernel/expander.py +0 -80
- mindspore/_extends/graph_kernel/expanders/__init__.py +0 -54
- mindspore/_extends/graph_kernel/expanders/_utils.py +0 -269
- mindspore/_extends/graph_kernel/expanders/addn.py +0 -33
- mindspore/_extends/graph_kernel/expanders/batchnorm.py +0 -152
- mindspore/_extends/graph_kernel/expanders/batchnorm_grad.py +0 -105
- mindspore/_extends/graph_kernel/expanders/clip_by_norm_no_div_sum.py +0 -33
- mindspore/_extends/graph_kernel/expanders/complex/abs.py +0 -30
- mindspore/_extends/graph_kernel/expanders/complex/add.py +0 -44
- mindspore/_extends/graph_kernel/expanders/complex/div.py +0 -62
- mindspore/_extends/graph_kernel/expanders/complex/mul.py +0 -52
- mindspore/_extends/graph_kernel/expanders/complex/real_div.py +0 -62
- mindspore/_extends/graph_kernel/expanders/complex/sub.py +0 -45
- mindspore/_extends/graph_kernel/expanders/conv2d.py +0 -200
- mindspore/_extends/graph_kernel/expanders/dropout_grad.py +0 -30
- mindspore/_extends/graph_kernel/expanders/equal_count.py +0 -50
- mindspore/_extends/graph_kernel/expanders/erfc.py +0 -35
- mindspore/_extends/graph_kernel/expanders/expand_dims.py +0 -50
- mindspore/_extends/graph_kernel/expanders/fused_adam.py +0 -44
- mindspore/_extends/graph_kernel/expanders/fused_adam_weight_decay.py +0 -47
- mindspore/_extends/graph_kernel/expanders/fused_mul_add.py +0 -28
- mindspore/_extends/graph_kernel/expanders/gelu_grad.py +0 -70
- mindspore/_extends/graph_kernel/expanders/gkdropout.py +0 -40
- mindspore/_extends/graph_kernel/expanders/identity.py +0 -25
- mindspore/_extends/graph_kernel/expanders/layernorm.py +0 -93
- mindspore/_extends/graph_kernel/expanders/layernorm_grad.py +0 -113
- mindspore/_extends/graph_kernel/expanders/logsoftmax.py +0 -46
- mindspore/_extends/graph_kernel/expanders/logsoftmax_grad.py +0 -36
- mindspore/_extends/graph_kernel/expanders/matmul.py +0 -80
- mindspore/_extends/graph_kernel/expanders/maximum_grad.py +0 -59
- mindspore/_extends/graph_kernel/expanders/minimum_grad.py +0 -80
- mindspore/_extends/graph_kernel/expanders/oneslike.py +0 -26
- mindspore/_extends/graph_kernel/expanders/reduce_mean.py +0 -43
- mindspore/_extends/graph_kernel/expanders/relu_grad.py +0 -32
- mindspore/_extends/graph_kernel/expanders/sigmoid_cross_entropy_with_logits.py +0 -41
- mindspore/_extends/graph_kernel/expanders/sigmoid_cross_entropy_with_logits_grad.py +0 -35
- mindspore/_extends/graph_kernel/expanders/sigmoid_grad.py +0 -31
- mindspore/_extends/graph_kernel/expanders/slice.py +0 -35
- mindspore/_extends/graph_kernel/expanders/softmax_cross_entropy_with_logits.py +0 -42
- mindspore/_extends/graph_kernel/expanders/softmax_grad_ext.py +0 -41
- mindspore/_extends/graph_kernel/expanders/softsign.py +0 -28
- mindspore/_extends/graph_kernel/expanders/sqrt_grad.py +0 -29
- mindspore/_extends/graph_kernel/expanders/square_sum_all.py +0 -44
- mindspore/_extends/graph_kernel/expanders/square_sum_v1.py +0 -37
- mindspore/_extends/graph_kernel/expanders/squared_difference.py +0 -43
- mindspore/_extends/graph_kernel/expanders/tanh_grad.py +0 -31
- mindspore/_extends/graph_kernel/model/op_infer.py +0 -506
- mindspore/dataset/datapreprocess/__init__.py +0 -20
- mindspore/dataset/datapreprocess/preprocess_imagenet_validate_dataset.py +0 -54
- mindspore/include/api/net.h +0 -142
- mindspore/nn/lr_scheduler.py +0 -262
- mindspore/ops/_grad_experimental/grad_image_ops.py +0 -248
- mindspore/ops/_grad_experimental/grad_linalg_ops.py +0 -181
- mindspore/ops/_grad_experimental/grad_other_ops.py +0 -72
- mindspore/ops/_grad_experimental/grad_scalar_ops.py +0 -112
- mindspore/ops/_grad_experimental/grad_sequence_ops.py +0 -351
- mindspore/ops/bprop_mindir/BNTrainingReduce_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/Broadcast_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/Depend_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/DepthwiseConv2dNative_bprop.mindir +0 -138
- mindspore/ops/bprop_mindir/EmbeddingLookup_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/Load_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/ScatterNonAliasingAdd_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/SparseGatherV2_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/SparseSoftmaxCrossEntropyWithLogits_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/Switch_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/TransShape_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/TupleGetItem_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/Unique_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/Unstack_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/generate_mindir.py +0 -114
- mindspore/rewrite/node_visitor.py +0 -44
- {mindspore-2.1.0.dist-info → mindspore-2.2.10.dist-info}/WHEEL +0 -0
- {mindspore-2.1.0.dist-info → mindspore-2.2.10.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2019-
|
|
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.
|
|
159
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
160
160
|
|
|
161
161
|
Note:
|
|
162
|
-
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
..
|
|
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.
|
|
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.
|
|
305
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
330
306
|
|
|
331
307
|
Note:
|
|
332
|
-
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
..
|
|
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.
|
|
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.
|
|
419
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
468
420
|
|
|
469
421
|
Note:
|
|
470
|
-
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
..
|
|
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.
|
|
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.
|
|
570
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
643
571
|
|
|
644
572
|
Note:
|
|
645
|
-
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
..
|
|
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.
|
|
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.
|
|
684
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
781
685
|
|
|
782
686
|
Note:
|
|
783
|
-
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
..
|
|
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.
|
|
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.
|
|
801
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
922
802
|
|
|
923
803
|
Note:
|
|
924
|
-
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
..
|
|
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.
|
|
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.
|
|
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
|
-
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
..
|
|
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
|
|
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
|
-
|
|
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.
|
|
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.
|
|
1193
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
1358
1194
|
|
|
1359
1195
|
Note:
|
|
1360
|
-
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
..
|
|
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.
|
|
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.
|
|
1352
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
1541
1353
|
|
|
1542
1354
|
Note:
|
|
1543
|
-
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
..
|
|
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.
|
|
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.
|
|
1468
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
1681
1469
|
|
|
1682
1470
|
Note:
|
|
1683
|
-
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
..
|
|
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.
|
|
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.
|
|
1540
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
1777
1541
|
|
|
1778
1542
|
Note:
|
|
1779
|
-
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
..
|
|
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.
|
|
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.
|
|
1647
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
1908
1648
|
|
|
1909
1649
|
Note:
|
|
1910
|
-
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
..
|
|
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.
|
|
1870
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
2155
1871
|
|
|
2156
1872
|
Note:
|
|
2157
|
-
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
..
|
|
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.
|
|
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.
|
|
2020
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
2329
2021
|
|
|
2330
2022
|
Note:
|
|
2331
|
-
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
..
|
|
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.
|
|
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.
|
|
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
|
-
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
..
|
|
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.
|
|
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.
|
|
2282
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
2639
2283
|
|
|
2640
2284
|
Note:
|
|
2641
|
-
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
..
|
|
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.
|
|
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.
|
|
2403
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
2784
2404
|
|
|
2785
2405
|
Note:
|
|
2786
|
-
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
..
|
|
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.
|
|
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.
|
|
2512
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
2917
2513
|
|
|
2918
2514
|
Note:
|
|
2919
|
-
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
..
|
|
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.
|
|
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.
|
|
2652
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
3081
2653
|
|
|
3082
2654
|
Note:
|
|
3083
|
-
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
..
|
|
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.
|
|
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.
|
|
2774
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
3227
2775
|
|
|
3228
2776
|
Note:
|
|
3229
|
-
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
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.
|
|
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.
|
|
2895
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
3371
2896
|
|
|
3372
2897
|
Note:
|
|
3373
|
-
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
..
|
|
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.
|
|
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.
|
|
2998
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
3498
2999
|
|
|
3499
3000
|
Note:
|
|
3500
|
-
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
..
|
|
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.
|
|
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 ``
|
|
3638
|
-
ValueError: If name is not ``
|
|
3639
|
-
``
|
|
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.
|
|
3123
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
3646
3124
|
|
|
3647
3125
|
Note:
|
|
3648
|
-
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
..
|
|
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.
|
|
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.
|
|
3248
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
3795
3249
|
|
|
3796
3250
|
Note:
|
|
3797
|
-
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
..
|
|
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.
|
|
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.
|
|
3369
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
3940
3370
|
|
|
3941
3371
|
Note:
|
|
3942
|
-
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
..
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
3553
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
4148
3554
|
|
|
4149
3555
|
Note:
|
|
4150
|
-
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
..
|
|
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.
|
|
3749
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
4368
3750
|
|
|
4369
3751
|
Note:
|
|
4370
|
-
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
..
|
|
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.
|
|
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.
|
|
3860
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
4503
3861
|
|
|
4504
3862
|
Note:
|
|
4505
|
-
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
..
|
|
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.
|
|
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.
|
|
3957
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
4624
3958
|
|
|
4625
3959
|
Note:
|
|
4626
|
-
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
..
|
|
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.
|
|
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.
|
|
4068
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
4759
4069
|
|
|
4760
4070
|
Note:
|
|
4761
|
-
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
..
|
|
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.
|
|
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.
|
|
4180
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
4895
4181
|
|
|
4896
4182
|
Note:
|
|
4897
|
-
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
..
|
|
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.
|
|
4339
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
5078
4340
|
|
|
5079
4341
|
Note:
|
|
5080
|
-
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
..
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
-
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
..
|
|
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.
|
|
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.
|
|
4734
|
+
<https://www.mindspore.cn/docs/en/r2.2/api_python/samples/dataset/dataset_gallery.html>`_
|
|
5521
4735
|
|
|
5522
4736
|
Note:
|
|
5523
|
-
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
..
|
|
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
|