mindspore 2.0.0rc1__cp38-cp38-manylinux1_x86_64.whl → 2.2.0__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/Third_Party_Open_Source_Software_Notice +2 -2
- mindspore/__init__.py +5 -2
- mindspore/_akg/akg/build_module.py +5 -6
- mindspore/_akg/akg/composite/build_module.py +49 -16
- mindspore/_akg/akg/composite/split_stitch.py +10 -11
- mindspore/_akg/akg/config/repository.json +195 -0
- mindspore/_akg/akg/global_configs.py +5 -1
- 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/composite_op_helper.py +9 -10
- mindspore/_akg/akg/utils/kernel_exec.py +58 -260
- mindspore/_akg/akg/utils/op_dsl.py +17 -1
- mindspore/_akg/akg/utils/result_analysis.py +4 -24
- mindspore/_akg/akg/utils/tbe_codegen_utils.py +198 -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 +5 -1
- mindspore/_checkparam.py +79 -62
- mindspore/_extends/graph_kernel/__init__.py +0 -1
- mindspore/_extends/graph_kernel/model/graph_split.py +2 -0
- mindspore/_extends/graph_kernel/model/model_builder.py +9 -50
- mindspore/_extends/graph_kernel/splitter.py +1 -9
- mindspore/_extends/parallel_compile/akg_compiler/akg_process.py +128 -21
- mindspore/_extends/parallel_compile/akg_compiler/build_tbe_kernel.py +2 -2
- mindspore/_extends/parallel_compile/akg_compiler/tbe_topi.py +4 -2
- mindspore/_extends/parallel_compile/tbe_compiler/tbe_adapter.py +18 -13
- mindspore/_extends/parallel_compile/tbe_compiler/tbe_helper.py +13 -9
- 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 +19 -17
- mindspore/_extends/parse/namespace.py +7 -36
- mindspore/_extends/parse/parser.py +375 -189
- mindspore/_extends/parse/resources.py +36 -41
- mindspore/_extends/parse/standard_method.py +350 -245
- mindspore/_extends/parse/trope.py +2 -12
- mindspore/_extends/remote/kernel_build_server.py +24 -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 +85 -19
- mindspore/bin/cache_admin +0 -0
- mindspore/bin/cache_server +0 -0
- mindspore/boost/base.py +2 -2
- mindspore/boost/boost.py +27 -32
- mindspore/boost/boost_cell_wrapper.py +37 -13
- mindspore/boost/grad_accumulation.py +1 -1
- mindspore/boost/grad_freeze.py +34 -6
- mindspore/boost/group_loss_scale_manager.py +15 -14
- mindspore/boost/less_batch_normalization.py +28 -3
- mindspore/common/__init__.py +15 -11
- mindspore/common/_auto_dynamic.py +68 -0
- mindspore/common/_jit_fallback_utils.py +111 -0
- mindspore/common/_register_for_adapter.py +17 -5
- mindspore/common/_register_for_tensor.py +2 -2
- mindspore/common/_stub_tensor.py +18 -15
- mindspore/common/_utils.py +31 -7
- mindspore/common/api.py +269 -101
- mindspore/common/auto_dynamic_shape.py +498 -0
- mindspore/common/dtype.py +61 -21
- mindspore/common/dump.py +9 -7
- mindspore/common/initializer.py +106 -76
- mindspore/common/jit_config.py +35 -14
- mindspore/common/lazy_inline.py +187 -0
- mindspore/common/mindir_util.py +101 -0
- mindspore/common/mutable.py +10 -13
- mindspore/common/parameter.py +246 -55
- mindspore/common/seed.py +13 -7
- mindspore/common/sparse_tensor.py +29 -33
- mindspore/common/tensor.py +907 -251
- mindspore/communication/__init__.py +7 -4
- mindspore/communication/_comm_helper.py +84 -4
- mindspore/communication/management.py +160 -88
- mindspore/config/op_info.config +99 -75
- mindspore/config/super_bar_config.json +36 -4
- mindspore/context.py +526 -219
- mindspore/dataset/__init__.py +9 -46
- mindspore/dataset/audio/__init__.py +4 -19
- mindspore/dataset/audio/transforms.py +545 -233
- mindspore/dataset/audio/utils.py +21 -18
- mindspore/dataset/callback/ds_callback.py +42 -13
- mindspore/dataset/core/config.py +158 -100
- mindspore/dataset/core/validator_helpers.py +1 -63
- mindspore/dataset/debug/debug_hook.py +45 -13
- mindspore/dataset/debug/pre_defined_hook.py +5 -5
- mindspore/dataset/engine/__init__.py +0 -5
- mindspore/dataset/engine/cache_client.py +38 -15
- mindspore/dataset/engine/datasets.py +615 -278
- mindspore/dataset/engine/datasets_audio.py +154 -283
- mindspore/dataset/engine/datasets_standard_format.py +104 -116
- mindspore/dataset/engine/datasets_text.py +443 -326
- mindspore/dataset/engine/datasets_user_defined.py +251 -164
- mindspore/dataset/engine/datasets_vision.py +839 -1443
- mindspore/dataset/engine/iterators.py +11 -4
- mindspore/dataset/engine/obs/obs_mindrecord_dataset.py +7 -3
- mindspore/dataset/engine/obs/util.py +3 -0
- mindspore/dataset/engine/offload.py +6 -6
- mindspore/dataset/engine/queue.py +15 -14
- mindspore/dataset/engine/samplers.py +39 -23
- mindspore/dataset/engine/serializer_deserializer.py +22 -6
- mindspore/dataset/engine/validators.py +21 -331
- mindspore/dataset/text/__init__.py +5 -33
- mindspore/dataset/text/transforms.py +334 -165
- mindspore/dataset/text/utils.py +215 -145
- mindspore/dataset/transforms/__init__.py +1 -1
- mindspore/dataset/transforms/c_transforms.py +3 -2
- mindspore/dataset/transforms/py_transforms_util.py +40 -12
- mindspore/dataset/transforms/transforms.py +174 -71
- mindspore/dataset/utils/browse_dataset.py +25 -17
- mindspore/dataset/utils/line_reader.py +24 -21
- mindspore/dataset/vision/__init__.py +5 -26
- mindspore/dataset/vision/c_transforms.py +177 -165
- mindspore/dataset/vision/py_transforms.py +114 -119
- mindspore/dataset/vision/py_transforms_util.py +54 -51
- mindspore/dataset/vision/transforms.py +1127 -381
- mindspore/dataset/vision/utils.py +54 -38
- mindspore/dataset/vision/validators.py +12 -2
- mindspore/experimental/map_parameter.py +38 -4
- mindspore/{dataset/datapreprocess → experimental/optim}/__init__.py +14 -4
- mindspore/experimental/optim/adam.py +192 -0
- mindspore/experimental/optim/adamw.py +181 -0
- mindspore/experimental/optim/lr_scheduler.py +1427 -0
- mindspore/experimental/optim/optimizer.py +252 -0
- mindspore/experimental/optim/sgd.py +147 -0
- mindspore/gen_ops.py +273 -0
- mindspore/include/OWNERS +1 -2
- mindspore/include/api/context.h +21 -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 +29 -42
- mindspore/include/api/model_group.h +14 -3
- mindspore/include/api/model_parallel_runner.h +18 -2
- mindspore/include/api/serialization.h +26 -0
- mindspore/include/api/status.h +1 -0
- mindspore/include/api/types.h +38 -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/c_api/status_c.h +3 -0
- mindspore/include/dataset/constants.h +6 -12
- mindspore/include/dataset/execute.h +23 -13
- mindspore/include/dataset/text.h +26 -26
- mindspore/include/dataset/transforms.h +25 -31
- 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/format.h +0 -1
- mindspore/include/mindapi/base/type_id.h +2 -1
- mindspore/include/mindapi/base/types.h +5 -1
- 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/libmpi_adapter.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_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 +9000 -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/gpu10.1/libnvidia_collective.so +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.1/libnvidia_collective.so +0 -0
- mindspore/lib/plugin/gpu11.6/libakg.so +0 -0
- mindspore/lib/plugin/gpu11.6/libnccl.so.2 +0 -0
- mindspore/lib/plugin/gpu11.6/libnvidia_collective.so +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/log.py +9 -6
- mindspore/mindrecord/filereader.py +33 -4
- mindspore/mindrecord/filewriter.py +70 -35
- mindspore/mindrecord/mindpage.py +40 -34
- mindspore/mindrecord/shardreader.py +1 -1
- mindspore/mindrecord/shardsegment.py +1 -1
- mindspore/mindrecord/tools/cifar100_to_mr.py +25 -18
- mindspore/mindrecord/tools/cifar10_to_mr.py +25 -18
- mindspore/mindrecord/tools/csv_to_mr.py +29 -13
- mindspore/mindrecord/tools/imagenet_to_mr.py +24 -10
- mindspore/mindrecord/tools/mnist_to_mr.py +24 -11
- mindspore/mindrecord/tools/tfrecord_to_mr.py +31 -26
- mindspore/nn/cell.py +463 -169
- mindspore/nn/dynamic_lr.py +47 -43
- mindspore/nn/layer/activation.py +225 -82
- mindspore/nn/layer/basic.py +121 -79
- mindspore/nn/layer/channel_shuffle.py +21 -21
- mindspore/nn/layer/combined.py +33 -26
- mindspore/nn/layer/container.py +277 -22
- mindspore/nn/layer/conv.py +441 -304
- mindspore/nn/layer/dense.py +19 -13
- mindspore/nn/layer/embedding.py +62 -49
- mindspore/nn/layer/flash_attention.py +264 -0
- mindspore/nn/layer/image.py +50 -39
- mindspore/nn/layer/math.py +62 -51
- mindspore/nn/layer/normalization.py +219 -167
- mindspore/nn/layer/padding.py +58 -70
- mindspore/nn/layer/pooling.py +334 -287
- mindspore/nn/layer/rnn_cells.py +53 -38
- mindspore/nn/layer/rnns.py +59 -56
- mindspore/nn/layer/thor_layer.py +52 -44
- mindspore/nn/layer/timedistributed.py +6 -4
- mindspore/nn/layer/transformer.py +284 -164
- mindspore/nn/learning_rate_schedule.py +34 -25
- mindspore/nn/loss/__init__.py +3 -2
- mindspore/nn/loss/loss.py +554 -311
- mindspore/nn/optim/ada_grad.py +12 -9
- mindspore/nn/optim/adadelta.py +14 -11
- mindspore/nn/optim/adafactor.py +19 -16
- mindspore/nn/optim/adam.py +62 -47
- mindspore/nn/optim/adamax.py +13 -10
- mindspore/nn/optim/adasum.py +12 -8
- mindspore/nn/optim/asgd.py +10 -9
- mindspore/nn/optim/ftrl.py +20 -17
- mindspore/nn/optim/lamb.py +16 -12
- mindspore/nn/optim/lars.py +8 -6
- mindspore/nn/optim/lazyadam.py +25 -20
- mindspore/nn/optim/momentum.py +10 -7
- mindspore/nn/optim/optimizer.py +61 -9
- mindspore/nn/optim/proximal_ada_grad.py +14 -13
- mindspore/nn/optim/rmsprop.py +17 -13
- mindspore/nn/optim/rprop.py +30 -17
- mindspore/nn/optim/sgd.py +40 -23
- mindspore/nn/optim/thor.py +24 -26
- mindspore/nn/probability/bijector/bijector.py +11 -11
- mindspore/nn/probability/bijector/exp.py +1 -1
- mindspore/nn/probability/bijector/gumbel_cdf.py +3 -3
- mindspore/nn/probability/bijector/invert.py +1 -1
- mindspore/nn/probability/bijector/power_transform.py +29 -29
- mindspore/nn/probability/bijector/scalar_affine.py +3 -3
- mindspore/nn/probability/bijector/softplus.py +5 -5
- mindspore/nn/probability/bnn_layers/bnn_cell_wrapper.py +4 -2
- mindspore/nn/probability/bnn_layers/conv_variational.py +13 -13
- mindspore/nn/probability/bnn_layers/dense_variational.py +12 -12
- mindspore/nn/probability/bnn_layers/layer_distribution.py +9 -8
- mindspore/nn/probability/distribution/_utils/custom_ops.py +19 -3
- mindspore/nn/probability/distribution/_utils/utils.py +1 -1
- mindspore/nn/probability/distribution/bernoulli.py +9 -9
- mindspore/nn/probability/distribution/beta.py +8 -8
- mindspore/nn/probability/distribution/categorical.py +23 -15
- mindspore/nn/probability/distribution/cauchy.py +5 -6
- mindspore/nn/probability/distribution/distribution.py +3 -3
- mindspore/nn/probability/distribution/exponential.py +4 -4
- mindspore/nn/probability/distribution/gamma.py +10 -10
- mindspore/nn/probability/distribution/geometric.py +8 -8
- mindspore/nn/probability/distribution/gumbel.py +8 -9
- mindspore/nn/probability/distribution/half_normal.py +5 -5
- mindspore/nn/probability/distribution/laplace.py +5 -5
- mindspore/nn/probability/distribution/log_normal.py +12 -11
- mindspore/nn/probability/distribution/logistic.py +8 -8
- mindspore/nn/probability/distribution/normal.py +6 -5
- mindspore/nn/probability/distribution/poisson.py +10 -11
- mindspore/nn/probability/distribution/student_t.py +8 -9
- mindspore/nn/probability/distribution/transformed_distribution.py +5 -5
- mindspore/nn/probability/distribution/uniform.py +11 -11
- mindspore/nn/reinforcement/tensor_array.py +2 -2
- mindspore/nn/sparse/sparse.py +9 -9
- mindspore/nn/wrap/cell_wrapper.py +188 -63
- mindspore/nn/wrap/grad_reducer.py +21 -12
- mindspore/nn/wrap/loss_scale.py +136 -49
- mindspore/numpy/__init__.py +4 -4
- mindspore/numpy/array_creations.py +55 -56
- mindspore/numpy/array_ops.py +134 -35
- mindspore/numpy/logic_ops.py +66 -20
- mindspore/numpy/math_ops.py +142 -139
- mindspore/numpy/utils_const.py +2 -2
- mindspore/offline_debug/convert_async.py +2 -2
- mindspore/ops/_grad_experimental/__init__.py +7 -5
- mindspore/ops/_grad_experimental/grad_array_ops.py +231 -348
- mindspore/ops/{_grad → _grad_experimental}/grad_base.py +1 -33
- mindspore/ops/{_grad → _grad_experimental}/grad_comm_ops.py +25 -13
- mindspore/ops/{_grad/__init__.py → _grad_experimental/grad_debug_ops.py} +15 -7
- mindspore/ops/{_grad → _grad_experimental}/grad_implementations.py +17 -11
- mindspore/ops/_grad_experimental/grad_inner_ops.py +33 -52
- mindspore/ops/_grad_experimental/grad_math_ops.py +151 -1224
- mindspore/ops/_grad_experimental/grad_nn_ops.py +141 -414
- mindspore/ops/{_grad → _grad_experimental}/grad_quant_ops.py +10 -6
- mindspore/ops/_grad_experimental/grad_sparse.py +317 -2
- mindspore/ops/_grad_experimental/grad_sparse_ops.py +3 -13
- mindspore/ops/{_grad → _grad_experimental}/taylor_rule.py +1 -1
- mindspore/ops/_op_impl/_custom_op/dsd_back_impl.py +1 -1
- mindspore/ops/_op_impl/_custom_op/flash_attention/__init__.py +0 -0
- mindspore/ops/_op_impl/_custom_op/flash_attention/attention.py +406 -0
- mindspore/{_extends/graph_kernel/expanders/complex/__init__.py → ops/_op_impl/_custom_op/flash_attention/constants.py} +27 -8
- mindspore/ops/_op_impl/_custom_op/flash_attention/flash_attention_bwd.py +467 -0
- mindspore/ops/_op_impl/_custom_op/flash_attention/flash_attention_fwd.py +563 -0
- mindspore/ops/_op_impl/_custom_op/flash_attention/flash_attention_impl.py +193 -0
- mindspore/ops/_op_impl/_custom_op/flash_attention/tik_ops_utils.py +435 -0
- mindspore/ops/_op_impl/_custom_op/flash_attention/tiling_strategy/__init__.py +0 -0
- mindspore/ops/_op_impl/_custom_op/flash_attention/tiling_strategy/sparse_tiling.py +45 -0
- mindspore/ops/_op_impl/_custom_op/flash_attention/tiling_strategy/strategy.py +67 -0
- mindspore/ops/_op_impl/_custom_op/flash_attention/tiling_strategy/wukong_tiling.py +62 -0
- mindspore/ops/_op_impl/_custom_op/matmul_cube_dense_left_impl.py +2 -2
- mindspore/ops/_op_impl/aicpu/__init__.py +41 -1
- mindspore/ops/_op_impl/aicpu/adaptive_max_pool_2d.py +37 -0
- mindspore/ops/_op_impl/aicpu/bias_add_grad.py +0 -1
- mindspore/ops/_op_impl/aicpu/cast.py +52 -0
- mindspore/ops/_op_impl/aicpu/coalesce.py +2 -0
- mindspore/ops/_op_impl/aicpu/col2im.py +3 -1
- mindspore/ops/_op_impl/aicpu/count_nonzero.py +43 -0
- mindspore/ops/_op_impl/aicpu/dropout_genmask.py +6 -0
- mindspore/ops/_op_impl/aicpu/eps.py +32 -0
- mindspore/ops/_op_impl/aicpu/eye.py +4 -4
- mindspore/ops/_op_impl/aicpu/fft_with_size.py +6 -0
- mindspore/ops/_op_impl/aicpu/fill_diagonal.py +5 -0
- mindspore/ops/_op_impl/aicpu/gamma.py +2 -2
- mindspore/ops/_op_impl/aicpu/im2col.py +3 -5
- mindspore/ops/_op_impl/aicpu/lgamma.py +1 -0
- mindspore/ops/_op_impl/aicpu/log_uniform_candidate_sampler.py +6 -3
- mindspore/ops/_op_impl/aicpu/lu.py +39 -0
- mindspore/ops/_op_impl/aicpu/lu_unpack_grad.py +0 -1
- mindspore/ops/_op_impl/aicpu/masked_scatter.py +1 -0
- mindspore/ops/_op_impl/aicpu/masked_select_grad.py +3 -0
- mindspore/ops/_op_impl/aicpu/matrix_band_part.py +59 -0
- mindspore/ops/_op_impl/aicpu/matrix_power.py +6 -1
- mindspore/ops/_op_impl/aicpu/median.py +1 -0
- mindspore/ops/_op_impl/aicpu/multinomial.py +9 -9
- mindspore/ops/_op_impl/aicpu/not_equal.py +0 -5
- mindspore/ops/_op_impl/aicpu/pad_v3.py +3 -1
- mindspore/ops/_op_impl/aicpu/pad_v3_grad.py +2 -0
- 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/resize_bilinear_grad.py +0 -1
- mindspore/ops/_op_impl/aicpu/resize_nearest_neighbor_v2.py +0 -6
- mindspore/ops/_op_impl/aicpu/resize_nearest_neighbor_v2_grad.py +0 -7
- mindspore/ops/_op_impl/aicpu/scatter_nd.py +2 -0
- mindspore/ops/_op_impl/aicpu/sequence_concat.py +40 -0
- mindspore/ops/_op_impl/aicpu/sequence_stack.py +40 -0
- 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 -4
- mindspore/ops/_op_impl/aicpu/standard_normal.py +5 -4
- 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/aicpu/upsample_nearest_3d.py +14 -6
- mindspore/ops/_op_impl/aicpu/upsample_nearest_3d_grad.py +22 -8
- mindspore/ops/_op_impl/aicpu/upsample_trilinear_3d.py +11 -6
- mindspore/ops/_op_impl/aicpu/upsample_trilinear_3d_grad.py +21 -10
- mindspore/ops/_op_impl/tbe/__init__.py +6 -4
- mindspore/ops/_op_impl/tbe/atomic_addr_clean.py +1 -1
- mindspore/ops/_op_impl/tbe/avg_pool.py +2 -2
- mindspore/ops/_op_impl/tbe/avg_pool_3d.py +3 -3
- mindspore/ops/_op_impl/tbe/avg_pool_3d_grad.py +4 -4
- mindspore/ops/_op_impl/tbe/avg_pool_ds.py +2 -2
- mindspore/ops/_op_impl/tbe/avg_pool_grad.py +3 -3
- mindspore/ops/_op_impl/tbe/avg_pool_grad_vm.py +3 -3
- mindspore/ops/_op_impl/tbe/batch_to_space.py +1 -1
- mindspore/ops/_op_impl/tbe/batch_to_space_nd.py +2 -2
- mindspore/ops/_op_impl/tbe/bn_infer.py +2 -2
- mindspore/ops/_op_impl/tbe/bn_infer_ds.py +3 -2
- mindspore/ops/_op_impl/tbe/broadcast_to.py +1 -1
- mindspore/ops/_op_impl/tbe/depthwise_conv2d.py +3 -3
- mindspore/ops/_op_impl/tbe/expand_dims.py +1 -1
- mindspore/ops/_op_impl/tbe/gather_v2.py +56 -0
- mindspore/ops/_op_impl/tbe/im2col.py +4 -4
- mindspore/ops/_op_impl/tbe/inplace_index_add.py +7 -3
- mindspore/ops/_op_impl/tbe/mem_set.py +38 -0
- mindspore/ops/_op_impl/tbe/scatter_nd_add.py +3 -0
- mindspore/ops/_op_impl/tbe/scatter_nd_d.py +1 -1
- mindspore/ops/_op_impl/tbe/space_to_batch.py +1 -1
- mindspore/ops/_op_impl/tbe/space_to_batch_nd.py +2 -2
- mindspore/ops/_op_impl/tbe/trans_data_ds.py +2 -0
- mindspore/ops/_primitive_cache.py +1 -1
- mindspore/ops/_tracefunc.py +241 -0
- mindspore/ops/_utils/utils.py +10 -2
- mindspore/ops/_vmap/vmap_array_ops.py +5 -3
- mindspore/ops/_vmap/vmap_base.py +5 -4
- mindspore/ops/_vmap/vmap_convolution_ops.py +1 -1
- mindspore/ops/_vmap/vmap_grad_math_ops.py +6 -4
- mindspore/ops/_vmap/vmap_grad_nn_ops.py +11 -6
- mindspore/ops/_vmap/vmap_math_ops.py +5 -2
- mindspore/ops/_vmap/vmap_nn_ops.py +135 -11
- mindspore/ops/arg_dtype_cast.py +54 -0
- mindspore/ops/composite/__init__.py +7 -5
- mindspore/ops/composite/base.py +78 -34
- mindspore/ops/composite/math_ops.py +5 -695
- mindspore/ops/composite/multitype_ops/_compile_utils.py +403 -97
- mindspore/ops/composite/multitype_ops/_constexpr_utils.py +28 -22
- mindspore/ops/composite/multitype_ops/add_impl.py +69 -7
- mindspore/ops/composite/multitype_ops/bitwise_and_impl.py +2 -1
- mindspore/ops/composite/multitype_ops/bitwise_or_impl.py +2 -1
- mindspore/ops/composite/multitype_ops/bitwise_xor_impl.py +2 -0
- mindspore/ops/composite/multitype_ops/div_impl.py +1 -0
- mindspore/ops/composite/multitype_ops/floordiv_impl.py +1 -0
- mindspore/ops/composite/multitype_ops/getitem_impl.py +48 -10
- mindspore/ops/composite/multitype_ops/greater_equal_impl.py +2 -0
- mindspore/ops/composite/multitype_ops/greater_impl.py +2 -0
- mindspore/ops/composite/multitype_ops/left_shift_impl.py +2 -0
- mindspore/ops/composite/multitype_ops/less_equal_impl.py +2 -0
- mindspore/ops/composite/multitype_ops/less_impl.py +2 -0
- mindspore/ops/composite/multitype_ops/logic_not_impl.py +2 -2
- mindspore/ops/composite/multitype_ops/mod_impl.py +1 -0
- mindspore/ops/composite/multitype_ops/mul_impl.py +1 -0
- mindspore/ops/composite/multitype_ops/negative_impl.py +1 -0
- mindspore/ops/composite/multitype_ops/not_in_impl.py +1 -0
- mindspore/ops/composite/multitype_ops/ones_like_impl.py +6 -0
- mindspore/ops/composite/multitype_ops/pow_impl.py +1 -0
- mindspore/ops/composite/multitype_ops/right_shift_impl.py +2 -0
- mindspore/ops/composite/multitype_ops/setitem_impl.py +10 -7
- mindspore/ops/composite/multitype_ops/sub_impl.py +1 -0
- mindspore/ops/composite/multitype_ops/uadd_impl.py +2 -0
- mindspore/ops/composite/multitype_ops/zeros_like_impl.py +9 -0
- mindspore/ops/deprecated.py +304 -0
- mindspore/ops/function/__init__.py +41 -4
- mindspore/ops/function/array_func.py +1108 -467
- mindspore/ops/function/clip_func.py +94 -27
- mindspore/ops/function/debug_func.py +3 -1
- mindspore/ops/function/grad/grad_func.py +82 -73
- mindspore/ops/function/image_func.py +28 -12
- mindspore/ops/function/linalg_func.py +135 -39
- mindspore/ops/function/math_func.py +3779 -894
- mindspore/ops/function/nn_func.py +1584 -657
- mindspore/ops/function/parameter_func.py +13 -3
- mindspore/ops/function/random_func.py +247 -153
- mindspore/ops/function/sparse_func.py +14 -11
- mindspore/ops/function/sparse_unary_func.py +173 -47
- mindspore/ops/function/spectral_func.py +8 -4
- mindspore/ops/function/vmap_func.py +8 -7
- mindspore/ops/functional.py +47 -16
- mindspore/ops/op_info_register.py +346 -86
- mindspore/ops/operations/__init__.py +38 -22
- mindspore/ops/operations/_grad_ops.py +145 -149
- mindspore/ops/operations/_inner_ops.py +298 -56
- mindspore/ops/operations/_ms_kernel.py +3 -3
- mindspore/ops/operations/_quant_ops.py +24 -28
- mindspore/ops/operations/_rl_inner_ops.py +9 -7
- mindspore/ops/operations/_scalar_ops.py +115 -0
- mindspore/ops/operations/_sequence_ops.py +148 -10
- mindspore/ops/operations/_tensor_array.py +1 -1
- mindspore/ops/operations/_thor_ops.py +2 -2
- mindspore/ops/operations/array_ops.py +1239 -561
- mindspore/ops/operations/comm_ops.py +166 -90
- mindspore/ops/operations/control_ops.py +3 -3
- mindspore/ops/operations/custom_ops.py +124 -102
- mindspore/ops/operations/debug_ops.py +24 -11
- mindspore/ops/operations/image_ops.py +86 -71
- mindspore/ops/operations/inner_ops.py +18 -13
- mindspore/ops/operations/linalg_ops.py +30 -11
- mindspore/ops/operations/math_ops.py +1730 -435
- mindspore/ops/operations/nn_ops.py +1953 -943
- mindspore/ops/operations/other_ops.py +65 -43
- mindspore/ops/operations/random_ops.py +258 -98
- mindspore/ops/operations/rl_ops.py +4 -36
- mindspore/ops/operations/sparse_ops.py +38 -33
- mindspore/ops/operations/spectral_ops.py +8 -4
- mindspore/ops/primitive.py +66 -44
- mindspore/ops/signature.py +5 -5
- mindspore/parallel/_auto_parallel_context.py +80 -19
- mindspore/parallel/_cost_model_context.py +42 -0
- mindspore/parallel/_offload_context.py +162 -72
- mindspore/parallel/_parallel_serialization.py +2 -2
- mindspore/parallel/_ps_context.py +16 -4
- mindspore/parallel/_recovery_context.py +2 -1
- mindspore/parallel/_tensor.py +15 -13
- mindspore/parallel/_transformer/layers.py +8 -6
- mindspore/parallel/_transformer/loss.py +1 -0
- mindspore/parallel/_transformer/moe.py +7 -7
- mindspore/parallel/_transformer/op_parallel_config.py +12 -1
- mindspore/parallel/_transformer/transformer.py +34 -14
- mindspore/parallel/_utils.py +36 -14
- mindspore/parallel/algo_parameter_config.py +114 -20
- mindspore/parallel/checkpoint_transform.py +16 -18
- mindspore/parallel/shard.py +16 -13
- mindspore/profiler/__init__.py +1 -1
- mindspore/profiler/common/struct_type.py +3 -3
- mindspore/profiler/common/util.py +3 -2
- mindspore/profiler/envprofiling.py +11 -4
- mindspore/profiler/parser/aicpu_data_parser.py +5 -3
- mindspore/profiler/parser/ascend_flops_generator.py +94 -0
- mindspore/profiler/parser/ascend_fpbp_generator.py +76 -0
- mindspore/profiler/parser/ascend_hccl_generator.py +288 -0
- mindspore/profiler/parser/ascend_msprof_exporter.py +213 -0
- mindspore/profiler/parser/ascend_msprof_generator.py +199 -0
- mindspore/profiler/parser/ascend_op_generator.py +276 -0
- mindspore/profiler/parser/ascend_steptrace_generator.py +94 -0
- mindspore/profiler/parser/ascend_timeline_generator.py +110 -54
- mindspore/profiler/parser/base_timeline_generator.py +11 -7
- mindspore/profiler/parser/cpu_gpu_timeline_generator.py +45 -46
- mindspore/profiler/parser/flops_parser.py +15 -11
- mindspore/profiler/parser/framework_parser.py +92 -73
- mindspore/profiler/parser/hccl_parser.py +16 -12
- mindspore/profiler/parser/integrator.py +22 -11
- mindspore/profiler/parser/memory_usage_parser.py +36 -11
- 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 +4 -5
- mindspore/profiler/parser/step_trace_parser.py +11 -14
- mindspore/profiler/profiling.py +678 -377
- mindspore/rewrite/api/node.py +211 -54
- mindspore/rewrite/api/node_type.py +5 -0
- mindspore/rewrite/api/pattern_engine.py +22 -23
- mindspore/rewrite/api/scoped_value.py +20 -17
- mindspore/rewrite/api/symbol_tree.py +252 -106
- mindspore/rewrite/api/tree_node_helper.py +3 -0
- 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 +97 -46
- mindspore/rewrite/common/rewrite_elog.py +5 -1
- mindspore/rewrite/namer.py +51 -51
- mindspore/rewrite/namespace.py +14 -5
- mindspore/{ops/bprop_mindir → rewrite/node}/__init__.py +9 -4
- 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} +313 -247
- mindspore/rewrite/node/node_manager.py +254 -0
- mindspore/rewrite/node/node_topological_manager.py +243 -0
- mindspore/rewrite/parsers/arguments_parser.py +22 -21
- mindspore/rewrite/parsers/assign_parser.py +225 -239
- mindspore/rewrite/parsers/attribute_parser.py +9 -7
- mindspore/rewrite/parsers/class_def_parser.py +179 -218
- 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 +23 -20
- mindspore/rewrite/parsers/if_parser.py +28 -24
- mindspore/rewrite/parsers/module_parser.py +202 -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/sparsify.py +4 -1
- mindspore/rewrite/sparsify/utils.py +11 -5
- mindspore/rewrite/symbol_tree.py +577 -732
- mindspore/rewrite/symbol_tree_builder.py +9 -175
- mindspore/rewrite/symbol_tree_dumper.py +2 -2
- mindspore/run_check/_check_version.py +46 -39
- mindspore/run_check/run_check.py +3 -2
- mindspore/{scipy/sparse → safeguard}/__init__.py +4 -5
- mindspore/safeguard/rewrite_obfuscation.py +517 -0
- mindspore/scipy/__init__.py +1 -1
- mindspore/scipy/linalg.py +67 -61
- mindspore/scipy/ops.py +5 -41
- mindspore/scipy/ops_grad.py +3 -2
- mindspore/scipy/ops_wrapper.py +5 -5
- mindspore/scipy/optimize/line_search.py +8 -8
- mindspore/scipy/optimize/linear_sum_assignment.py +4 -4
- mindspore/scipy/optimize/minimize.py +16 -12
- mindspore/scipy/utils.py +1 -52
- mindspore/scipy/utils_const.py +4 -4
- mindspore/train/__init__.py +4 -4
- mindspore/train/_utils.py +13 -5
- mindspore/train/amp.py +410 -148
- mindspore/train/anf_ir_pb2.py +16 -4
- mindspore/train/callback/_backup_and_restore.py +8 -11
- mindspore/train/callback/_callback.py +80 -3
- mindspore/train/callback/_checkpoint.py +82 -51
- mindspore/train/callback/_early_stop.py +12 -15
- mindspore/train/callback/_history.py +1 -1
- mindspore/train/callback/_lambda_callback.py +13 -13
- mindspore/train/callback/_landscape.py +21 -17
- mindspore/train/callback/_loss_monitor.py +9 -10
- mindspore/train/callback/_on_request_exit.py +16 -33
- mindspore/train/callback/_reduce_lr_on_plateau.py +21 -24
- mindspore/train/callback/_summary_collector.py +44 -30
- mindspore/train/callback/_time_monitor.py +62 -12
- mindspore/train/data_sink.py +10 -16
- mindspore/train/dataset_helper.py +154 -86
- mindspore/train/loss_scale_manager.py +14 -9
- mindspore/train/metrics/__init__.py +10 -2
- mindspore/train/metrics/accuracy.py +1 -1
- mindspore/train/metrics/auc.py +1 -1
- mindspore/train/metrics/bleu_score.py +2 -2
- mindspore/train/metrics/confusion_matrix.py +14 -14
- mindspore/train/metrics/cosine_similarity.py +3 -3
- mindspore/train/metrics/dice.py +1 -1
- mindspore/train/metrics/fbeta.py +1 -1
- mindspore/train/metrics/hausdorff_distance.py +8 -6
- mindspore/train/metrics/mean_surface_distance.py +5 -4
- mindspore/train/metrics/metric.py +49 -17
- mindspore/train/metrics/occlusion_sensitivity.py +4 -4
- mindspore/train/metrics/perplexity.py +1 -1
- mindspore/train/metrics/precision.py +2 -2
- mindspore/train/metrics/recall.py +2 -3
- mindspore/train/metrics/roc.py +7 -7
- mindspore/train/metrics/root_mean_square_surface_distance.py +5 -4
- mindspore/train/metrics/topk.py +7 -4
- mindspore/train/mind_ir_pb2.py +193 -48
- mindspore/train/model.py +377 -133
- mindspore/train/serialization.py +697 -245
- mindspore/train/summary/_summary_adapter.py +5 -2
- mindspore/train/summary/_writer_pool.py +4 -3
- mindspore/train/summary/summary_record.py +25 -23
- mindspore/train/train_thor/convert_utils.py +39 -23
- mindspore/train/train_thor/dataset_helper.py +4 -3
- mindspore/train/train_thor/model_thor.py +8 -8
- mindspore/version.py +1 -1
- {mindspore-2.0.0rc1.dist-info → mindspore-2.2.0.dist-info}/METADATA +7 -8
- {mindspore-2.0.0rc1.dist-info → mindspore-2.2.0.dist-info}/RECORD +647 -818
- {mindspore-2.0.0rc1.dist-info → mindspore-2.2.0.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 -57
- 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/bias_add_grad.py +0 -49
- 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/gather.py +0 -43
- 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/expanders/tile.py +0 -54
- mindspore/_extends/graph_kernel/model/op_infer.py +0 -506
- mindspore/_extends/parse/jit_fallback_modules.py +0 -51
- mindspore/dataset/datapreprocess/preprocess_imagenet_validate_dataset.py +0 -54
- mindspore/dataset/engine/graphdata.py +0 -1586
- mindspore/include/api/net.h +0 -142
- mindspore/ops/_grad/grad_array_ops.py +0 -1347
- mindspore/ops/_grad/grad_clip_ops.py +0 -84
- mindspore/ops/_grad/grad_debug_ops.py +0 -68
- mindspore/ops/_grad/grad_inner_ops.py +0 -235
- mindspore/ops/_grad/grad_math_ops.py +0 -1684
- mindspore/ops/_grad/grad_nn_ops.py +0 -1529
- mindspore/ops/_grad/grad_other_ops.py +0 -89
- mindspore/ops/_grad/grad_sequence_ops.py +0 -296
- mindspore/ops/_grad/grad_sparse.py +0 -323
- mindspore/ops/_grad_experimental/grad_image_ops.py +0 -249
- mindspore/ops/_grad_experimental/grad_linalg_ops.py +0 -195
- mindspore/ops/_grad_experimental/grad_scalar_ops.py +0 -112
- mindspore/ops/bprop_mindir/AdaptiveAvgPool2D_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/AdaptiveMaxPool2D_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/ApproximateEqual_bprop.mindir +0 -19
- mindspore/ops/bprop_mindir/Argmax_bprop.mindir +0 -15
- mindspore/ops/bprop_mindir/Argmin_bprop.mindir +0 -15
- mindspore/ops/bprop_mindir/AssignSub_bprop.mindir +0 -19
- mindspore/ops/bprop_mindir/Assign_bprop.mindir +0 -17
- mindspore/ops/bprop_mindir/AvgPool3D_bprop.mindir +0 -150
- mindspore/ops/bprop_mindir/AvgPool_bprop.mindir +0 -66
- mindspore/ops/bprop_mindir/BCEWithLogitsLoss_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/BNTrainingReduce_bprop.mindir +0 -15
- mindspore/ops/bprop_mindir/BatchNormGrad_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/BatchToSpaceND_bprop.mindir +0 -28
- mindspore/ops/bprop_mindir/BiasAddGrad_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/BinaryCrossEntropy_bprop.mindir +0 -33
- mindspore/ops/bprop_mindir/BroadcastTo_bprop.mindir +0 -306
- mindspore/ops/bprop_mindir/Broadcast_bprop.mindir +0 -13
- mindspore/ops/bprop_mindir/CTCLoss_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/Concat_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/Conv2DBackpropFilter_bprop.mindir +0 -240
- mindspore/ops/bprop_mindir/Conv2DBackpropInput_bprop.mindir +0 -247
- mindspore/ops/bprop_mindir/Conv2DTranspose_bprop.mindir +0 -247
- mindspore/ops/bprop_mindir/Conv3DTranspose_bprop.mindir +0 -315
- mindspore/ops/bprop_mindir/Conv3D_bprop.mindir +0 -278
- mindspore/ops/bprop_mindir/DType_bprop.mindir +0 -14
- mindspore/ops/bprop_mindir/DeformableOffsets_bprop.mindir +0 -58
- mindspore/ops/bprop_mindir/Depend_bprop.mindir +0 -13
- mindspore/ops/bprop_mindir/DepthToSpace_bprop.mindir +0 -23
- mindspore/ops/bprop_mindir/DepthwiseConv2dNative_bprop.mindir +0 -138
- mindspore/ops/bprop_mindir/DiagPart_bprop.mindir +0 -15
- mindspore/ops/bprop_mindir/Dropout2D_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/Dropout3D_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/DropoutDoMask_bprop.mindir +0 -25
- mindspore/ops/bprop_mindir/DropoutGenMask_bprop.mindir +0 -18
- mindspore/ops/bprop_mindir/DropoutGrad_bprop.mindir +0 -27
- mindspore/ops/bprop_mindir/Dropout_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/DynamicGRUV2_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/DynamicRNN_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/DynamicShape_bprop.mindir +0 -14
- mindspore/ops/bprop_mindir/Elu_bprop.mindir +0 -16
- mindspore/ops/bprop_mindir/EmbeddingLookup_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/Equal_bprop.mindir +0 -19
- mindspore/ops/bprop_mindir/ExpandDims_bprop.mindir +0 -58
- mindspore/ops/bprop_mindir/FastGeLU_bprop.mindir +0 -16
- mindspore/ops/bprop_mindir/Flatten_bprop.mindir +0 -54
- mindspore/ops/bprop_mindir/FloorDiv_bprop.mindir +0 -19
- mindspore/ops/bprop_mindir/GatherD_bprop.mindir +0 -26
- mindspore/ops/bprop_mindir/GatherNd_bprop.mindir +0 -57
- mindspore/ops/bprop_mindir/Gather_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/GreaterEqual_bprop.mindir +0 -19
- mindspore/ops/bprop_mindir/Greater_bprop.mindir +0 -19
- mindspore/ops/bprop_mindir/HSigmoid_bprop.mindir +0 -16
- mindspore/ops/bprop_mindir/HSwish_bprop.mindir +0 -16
- mindspore/ops/bprop_mindir/IOU_bprop.mindir +0 -19
- mindspore/ops/bprop_mindir/InstanceNorm_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/IsFinite_bprop.mindir +0 -15
- mindspore/ops/bprop_mindir/IsInf_bprop.mindir +0 -15
- mindspore/ops/bprop_mindir/IsNan_bprop.mindir +0 -15
- mindspore/ops/bprop_mindir/KLDivLoss_bprop.mindir +0 -126
- mindspore/ops/bprop_mindir/L2Loss_bprop.mindir +0 -15
- mindspore/ops/bprop_mindir/L2Normalize_bprop.mindir +0 -30
- mindspore/ops/bprop_mindir/LRN_bprop.mindir +0 -43
- mindspore/ops/bprop_mindir/LayerNormGrad_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/LessEqual_bprop.mindir +0 -19
- mindspore/ops/bprop_mindir/Less_bprop.mindir +0 -19
- mindspore/ops/bprop_mindir/LinSpace_bprop.mindir +0 -23
- mindspore/ops/bprop_mindir/Load_bprop.mindir +0 -13
- mindspore/ops/bprop_mindir/LogSoftmax_bprop.mindir +0 -23
- mindspore/ops/bprop_mindir/LogicalAnd_bprop.mindir +0 -19
- mindspore/ops/bprop_mindir/LogicalNot_bprop.mindir +0 -15
- mindspore/ops/bprop_mindir/MaskedSelect_bprop.mindir +0 -21
- mindspore/ops/bprop_mindir/MaxPool3DGradGrad_bprop.mindir +0 -74
- mindspore/ops/bprop_mindir/MaxPool3DGrad_bprop.mindir +0 -74
- mindspore/ops/bprop_mindir/MaxPool3D_bprop.mindir +0 -75
- mindspore/ops/bprop_mindir/MaxPoolGradGrad_bprop.mindir +0 -65
- mindspore/ops/bprop_mindir/MaxPoolWithArgmax_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/Maximum_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/Minimum_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/MirrorPad_bprop.mindir +0 -27
- mindspore/ops/bprop_mindir/Mish_bprop.mindir +0 -35
- mindspore/ops/bprop_mindir/MulNoNan_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/NLLLoss_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/NonZero_bprop.mindir +0 -14
- mindspore/ops/bprop_mindir/NotEqual_bprop.mindir +0 -19
- mindspore/ops/bprop_mindir/OneHot_bprop.mindir +0 -26
- mindspore/ops/bprop_mindir/OnesLike_bprop.mindir +0 -14
- mindspore/ops/bprop_mindir/PReLU_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/Pad_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/Padding_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/RNNTLoss_bprop.mindir +0 -29
- mindspore/ops/bprop_mindir/ROIAlign_bprop.mindir +0 -82
- mindspore/ops/bprop_mindir/Range_bprop.mindir +0 -22
- mindspore/ops/bprop_mindir/Rank_bprop.mindir +0 -14
- mindspore/ops/bprop_mindir/ReLU6_bprop.mindir +0 -16
- mindspore/ops/bprop_mindir/ReLUV2_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/ReduceAll_bprop.mindir +0 -19
- mindspore/ops/bprop_mindir/ReduceAny_bprop.mindir +0 -19
- mindspore/ops/bprop_mindir/ReluGrad_bprop.mindir +0 -20
- mindspore/ops/bprop_mindir/Reshape_bprop.mindir +0 -60
- mindspore/ops/bprop_mindir/ResizeBilinear_bprop.mindir +0 -29
- mindspore/ops/bprop_mindir/ResizeNearestNeighbor_bprop.mindir +0 -89
- mindspore/ops/bprop_mindir/ReverseSequence_bprop.mindir +0 -52
- mindspore/ops/bprop_mindir/ReverseV2_bprop.mindir +0 -22
- mindspore/ops/bprop_mindir/Round_bprop.mindir +0 -15
- mindspore/ops/bprop_mindir/ScatterMax_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/ScatterMin_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/ScatterNdUpdate_bprop.mindir +0 -22
- mindspore/ops/bprop_mindir/ScatterNd_bprop.mindir +0 -24
- mindspore/ops/bprop_mindir/ScatterNonAliasingAdd_bprop.mindir +0 -22
- mindspore/ops/bprop_mindir/ScatterUpdate_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/SeLU_bprop.mindir +0 -21
- mindspore/ops/bprop_mindir/Select_bprop.mindir +0 -31
- mindspore/ops/bprop_mindir/Shape_bprop.mindir +0 -14
- mindspore/ops/bprop_mindir/SigmoidCrossEntropyWithLogits_bprop.mindir +0 -21
- mindspore/ops/bprop_mindir/SigmoidGrad_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/Sigmoid_bprop.mindir +0 -16
- mindspore/ops/bprop_mindir/Sign_bprop.mindir +0 -15
- mindspore/ops/bprop_mindir/Slice_bprop.mindir +0 -26
- mindspore/ops/bprop_mindir/SmoothL1Loss_bprop.mindir +0 -36
- mindspore/ops/bprop_mindir/SoftmaxCrossEntropyWithLogits_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/Softplus_bprop.mindir +0 -16
- mindspore/ops/bprop_mindir/Softsign_bprop.mindir +0 -33
- mindspore/ops/bprop_mindir/Sort_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/SpaceToBatchND_bprop.mindir +0 -28
- mindspore/ops/bprop_mindir/SpaceToDepth_bprop.mindir +0 -23
- mindspore/ops/bprop_mindir/SparseGatherV2_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/SparseSoftmaxCrossEntropyWithLogits_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/Split_bprop.mindir +0 -22
- mindspore/ops/bprop_mindir/Squeeze_bprop.mindir +0 -54
- mindspore/ops/bprop_mindir/StridedSliceGrad_bprop.mindir +0 -95
- mindspore/ops/bprop_mindir/StridedSlice_bprop.mindir +0 -98
- mindspore/ops/bprop_mindir/Switch_bprop.mindir +0 -29
- mindspore/ops/bprop_mindir/TanhGrad_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/Tanh_bprop.mindir +0 -66
- mindspore/ops/bprop_mindir/TensorScatterAdd_bprop.mindir +0 -22
- mindspore/ops/bprop_mindir/TensorScatterUpdate_bprop.mindir +0 -29
- mindspore/ops/bprop_mindir/TensorShape_bprop.mindir +0 -14
- mindspore/ops/bprop_mindir/Tile_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/TopK_bprop.mindir +0 -0
- mindspore/ops/bprop_mindir/TransShape_bprop.mindir +0 -23
- mindspore/ops/bprop_mindir/TruncateDiv_bprop.mindir +0 -19
- mindspore/ops/bprop_mindir/TupleGetItem_bprop.mindir +0 -20
- mindspore/ops/bprop_mindir/Unique_bprop.mindir +0 -16
- mindspore/ops/bprop_mindir/Unstack_bprop.mindir +0 -22
- mindspore/ops/bprop_mindir/UpsampleNearest3D_bprop.mindir +0 -32
- mindspore/ops/bprop_mindir/UpsampleTrilinear3D_bprop.mindir +0 -38
- mindspore/ops/bprop_mindir/ZerosLike_bprop.mindir +0 -15
- mindspore/ops/bprop_mindir/generate_mindir.py +0 -114
- mindspore/rewrite/node_visitor.py +0 -44
- mindspore/rewrite/topological_manager.py +0 -203
- mindspore/scipy/sparse/linalg.py +0 -192
- {mindspore-2.0.0rc1.dist-info → mindspore-2.2.0.dist-info}/WHEEL +0 -0
- {mindspore-2.0.0rc1.dist-info → mindspore-2.2.0.dist-info}/top_level.txt +0 -0
|
@@ -21,11 +21,11 @@ from mindspore.ops.function import math_func, nn_func
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
def csr_cos(x: CSRTensor) -> CSRTensor:
|
|
24
|
-
"""
|
|
24
|
+
r"""
|
|
25
25
|
Computes cosine of input element-wise.
|
|
26
26
|
|
|
27
27
|
.. math::
|
|
28
|
-
out_i = cos(x_i)
|
|
28
|
+
out_i = \cos(x_i)
|
|
29
29
|
|
|
30
30
|
.. warning::
|
|
31
31
|
Currently support data types float16 and float32. If use Float64, there may be a problem of missing precision.
|
|
@@ -45,6 +45,8 @@ def csr_cos(x: CSRTensor) -> CSRTensor:
|
|
|
45
45
|
``Ascend`` ``GPU`` ``CPU``
|
|
46
46
|
|
|
47
47
|
Examples:
|
|
48
|
+
>>> from mindspore import dtype as mstype
|
|
49
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
48
50
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
49
51
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
50
52
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -60,11 +62,11 @@ def csr_cos(x: CSRTensor) -> CSRTensor:
|
|
|
60
62
|
|
|
61
63
|
|
|
62
64
|
def coo_cos(x: COOTensor) -> COOTensor:
|
|
63
|
-
"""
|
|
65
|
+
r"""
|
|
64
66
|
Computes cosine of input element-wise.
|
|
65
67
|
|
|
66
68
|
.. math::
|
|
67
|
-
out_i = cos(x_i)
|
|
69
|
+
out_i = \cos(x_i)
|
|
68
70
|
|
|
69
71
|
.. warning::
|
|
70
72
|
If use Float64, there may be a problem of missing precision.
|
|
@@ -84,6 +86,8 @@ def coo_cos(x: COOTensor) -> COOTensor:
|
|
|
84
86
|
``Ascend`` ``GPU`` ``CPU``
|
|
85
87
|
|
|
86
88
|
Examples:
|
|
89
|
+
>>> from mindspore import dtype as mstype
|
|
90
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
87
91
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
88
92
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
89
93
|
>>> shape = (3, 4)
|
|
@@ -103,7 +107,7 @@ def csr_tan(x: CSRTensor) -> CSRTensor:
|
|
|
103
107
|
|
|
104
108
|
.. math::
|
|
105
109
|
|
|
106
|
-
out_i = tan(x_i)
|
|
110
|
+
out_i = \tan(x_i)
|
|
107
111
|
|
|
108
112
|
Args:
|
|
109
113
|
x (CSRTensor): The input CSRTensor.
|
|
@@ -118,6 +122,8 @@ def csr_tan(x: CSRTensor) -> CSRTensor:
|
|
|
118
122
|
``Ascend`` ``GPU`` ``CPU``
|
|
119
123
|
|
|
120
124
|
Examples:
|
|
125
|
+
>>> from mindspore import dtype as mstype
|
|
126
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
121
127
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
122
128
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
123
129
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -138,7 +144,7 @@ def coo_tan(x: COOTensor) -> COOTensor:
|
|
|
138
144
|
|
|
139
145
|
.. math::
|
|
140
146
|
|
|
141
|
-
out_i = tan(x_i)
|
|
147
|
+
out_i = \tan(x_i)
|
|
142
148
|
|
|
143
149
|
Args:
|
|
144
150
|
x (COOTensor): The input COOTensor.
|
|
@@ -153,6 +159,8 @@ def coo_tan(x: COOTensor) -> COOTensor:
|
|
|
153
159
|
``Ascend`` ``GPU`` ``CPU``
|
|
154
160
|
|
|
155
161
|
Examples:
|
|
162
|
+
>>> from mindspore import dtype as mstype
|
|
163
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
156
164
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
157
165
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
158
166
|
>>> shape = (3, 4)
|
|
@@ -187,6 +195,8 @@ def csr_exp(x: CSRTensor) -> CSRTensor:
|
|
|
187
195
|
``Ascend`` ``GPU`` ``CPU``
|
|
188
196
|
|
|
189
197
|
Examples:
|
|
198
|
+
>>> from mindspore import dtype as mstype
|
|
199
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
190
200
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
191
201
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
192
202
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -222,6 +232,8 @@ def coo_exp(x: COOTensor) -> COOTensor:
|
|
|
222
232
|
``Ascend`` ``GPU`` ``CPU``
|
|
223
233
|
|
|
224
234
|
Examples:
|
|
235
|
+
>>> from mindspore import dtype as mstype
|
|
236
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
225
237
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
226
238
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
227
239
|
>>> shape = (3, 4)
|
|
@@ -256,6 +268,8 @@ def csr_inv(x: CSRTensor) -> CSRTensor:
|
|
|
256
268
|
``Ascend`` ``GPU`` ``CPU``
|
|
257
269
|
|
|
258
270
|
Examples:
|
|
271
|
+
>>> from mindspore import dtype as mstype
|
|
272
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
259
273
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
260
274
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
261
275
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -291,6 +305,8 @@ def coo_inv(x: COOTensor) -> COOTensor:
|
|
|
291
305
|
``Ascend`` ``GPU`` ``CPU``
|
|
292
306
|
|
|
293
307
|
Examples:
|
|
308
|
+
>>> from mindspore import dtype as mstype
|
|
309
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
294
310
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
295
311
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
296
312
|
>>> shape = (3, 4)
|
|
@@ -305,7 +321,7 @@ def coo_inv(x: COOTensor) -> COOTensor:
|
|
|
305
321
|
|
|
306
322
|
|
|
307
323
|
def csr_relu(x: CSRTensor) -> CSRTensor:
|
|
308
|
-
"""
|
|
324
|
+
r"""
|
|
309
325
|
Computes ReLU (Rectified Linear Unit activation function) of input csr_tensors element-wise.
|
|
310
326
|
|
|
311
327
|
It returns max(x, 0) element-wise. Specially, the neurons with the negative output
|
|
@@ -313,7 +329,7 @@ def csr_relu(x: CSRTensor) -> CSRTensor:
|
|
|
313
329
|
|
|
314
330
|
.. math::
|
|
315
331
|
|
|
316
|
-
ReLU(x) = (x)^+ = max(0, x)
|
|
332
|
+
ReLU(x) = (x)^+ = \max(0, x)
|
|
317
333
|
|
|
318
334
|
Note:
|
|
319
335
|
In general, this operator is more commonly used. The difference from `ReLuV2` is that the `ReLuV2` will
|
|
@@ -333,6 +349,8 @@ def csr_relu(x: CSRTensor) -> CSRTensor:
|
|
|
333
349
|
``Ascend`` ``GPU`` ``CPU``
|
|
334
350
|
|
|
335
351
|
Examples:
|
|
352
|
+
>>> from mindspore import dtype as mstype
|
|
353
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
336
354
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
337
355
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
338
356
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -356,7 +374,7 @@ def coo_relu(x: COOTensor) -> COOTensor:
|
|
|
356
374
|
|
|
357
375
|
.. math::
|
|
358
376
|
|
|
359
|
-
ReLU(x) = (x)^+ = max(0, x)
|
|
377
|
+
ReLU(x) = (x)^+ = \max(0, x)
|
|
360
378
|
|
|
361
379
|
Note:
|
|
362
380
|
In general, this operator is more commonly used. The difference from `ReLuV2` is that the `ReLuV2` will
|
|
@@ -365,7 +383,7 @@ def coo_relu(x: COOTensor) -> COOTensor:
|
|
|
365
383
|
Args:
|
|
366
384
|
x (COOTensor): Input COOTensor with shape :math:`(N, *)`, where :math:`*`
|
|
367
385
|
means any number of additional dimensions. Its dtype is
|
|
368
|
-
`number <https://www.mindspore.cn/docs/en/r2.
|
|
386
|
+
`number <https://www.mindspore.cn/docs/en/r2.2/api_python/mindspore.html#mindspore.dtype>`_.
|
|
369
387
|
|
|
370
388
|
Returns:
|
|
371
389
|
COOTensor, has the same shape and dtype as the `x`.
|
|
@@ -378,6 +396,8 @@ def coo_relu(x: COOTensor) -> COOTensor:
|
|
|
378
396
|
``Ascend`` ``GPU`` ``CPU``
|
|
379
397
|
|
|
380
398
|
Examples:
|
|
399
|
+
>>> from mindspore import dtype as mstype
|
|
400
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
381
401
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
382
402
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
383
403
|
>>> shape = (3, 4)
|
|
@@ -413,6 +433,8 @@ def csr_expm1(x: CSRTensor) -> CSRTensor:
|
|
|
413
433
|
``Ascend`` ``GPU`` ``CPU``
|
|
414
434
|
|
|
415
435
|
Examples:
|
|
436
|
+
>>> from mindspore import dtype as mstype
|
|
437
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
416
438
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
417
439
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
418
440
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -449,6 +471,8 @@ def coo_expm1(x: COOTensor) -> COOTensor:
|
|
|
449
471
|
``Ascend`` ``GPU`` ``CPU``
|
|
450
472
|
|
|
451
473
|
Examples:
|
|
474
|
+
>>> from mindspore import dtype as mstype
|
|
475
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
452
476
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
453
477
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
454
478
|
>>> shape = (3, 4)
|
|
@@ -469,7 +493,7 @@ def csr_isfinite(x: CSRTensor) -> CSRTensor:
|
|
|
469
493
|
.. math::
|
|
470
494
|
|
|
471
495
|
out_i = \begin{cases}
|
|
472
|
-
& \text{ if } x_{i} = \text{Finite},\ \ True
|
|
496
|
+
& \text{ if } x_{i} = \text{Finite},\ \ True \\
|
|
473
497
|
& \text{ if } x_{i} \ne \text{Finite},\ \ False
|
|
474
498
|
\end{cases}
|
|
475
499
|
|
|
@@ -486,6 +510,8 @@ def csr_isfinite(x: CSRTensor) -> CSRTensor:
|
|
|
486
510
|
``Ascend`` ``GPU`` ``CPU``
|
|
487
511
|
|
|
488
512
|
Examples:
|
|
513
|
+
>>> from mindspore import dtype as mstype
|
|
514
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
489
515
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
490
516
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
491
517
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -524,6 +550,8 @@ def coo_isfinite(x: COOTensor) -> COOTensor:
|
|
|
524
550
|
``Ascend`` ``GPU`` ``CPU``
|
|
525
551
|
|
|
526
552
|
Examples:
|
|
553
|
+
>>> from mindspore import dtype as mstype
|
|
554
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
527
555
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
528
556
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
529
557
|
>>> shape = (3, 4)
|
|
@@ -538,12 +566,12 @@ def coo_isfinite(x: COOTensor) -> COOTensor:
|
|
|
538
566
|
|
|
539
567
|
|
|
540
568
|
def csr_asin(x: CSRTensor) -> CSRTensor:
|
|
541
|
-
"""
|
|
569
|
+
r"""
|
|
542
570
|
Computes arcsine of input csr_tensors element-wise.
|
|
543
571
|
|
|
544
572
|
.. math::
|
|
545
573
|
|
|
546
|
-
out_i = sin^{-1}(x_i)
|
|
574
|
+
out_i = \sin^{-1}(x_i)
|
|
547
575
|
|
|
548
576
|
Args:
|
|
549
577
|
x (CSRTensor): Input CSRTensor. The data types should be one of the following types:
|
|
@@ -560,6 +588,8 @@ def csr_asin(x: CSRTensor) -> CSRTensor:
|
|
|
560
588
|
``Ascend`` ``GPU`` ``CPU``
|
|
561
589
|
|
|
562
590
|
Examples:
|
|
591
|
+
>>> from mindspore import dtype as mstype
|
|
592
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
563
593
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
564
594
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
565
595
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -575,16 +605,16 @@ def csr_asin(x: CSRTensor) -> CSRTensor:
|
|
|
575
605
|
|
|
576
606
|
|
|
577
607
|
def coo_asin(x: COOTensor) -> COOTensor:
|
|
578
|
-
"""
|
|
608
|
+
r"""
|
|
579
609
|
Computes arcsine of input coo_tensors element-wise.
|
|
580
610
|
|
|
581
611
|
.. math::
|
|
582
612
|
|
|
583
|
-
out_i = sin^{-1}(x_i)
|
|
613
|
+
out_i = \sin^{-1}(x_i)
|
|
584
614
|
|
|
585
615
|
Args:
|
|
586
616
|
x (COOTensor): Input COOTensor. The shape of COOTensor is :math:`(N,*)` ,
|
|
587
|
-
where :math:`*` means
|
|
617
|
+
where :math:`*` means any number of additional dimensions.
|
|
588
618
|
The data type should be one of the following types: float16, float32, float64, complex64, complex128.
|
|
589
619
|
|
|
590
620
|
Returns:
|
|
@@ -598,6 +628,8 @@ def coo_asin(x: COOTensor) -> COOTensor:
|
|
|
598
628
|
``Ascend`` ``GPU`` ``CPU``
|
|
599
629
|
|
|
600
630
|
Examples:
|
|
631
|
+
>>> from mindspore import dtype as mstype
|
|
632
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
601
633
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
602
634
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
603
635
|
>>> shape = (3, 4)
|
|
@@ -632,6 +664,8 @@ def csr_sqrt(x: CSRTensor) -> CSRTensor:
|
|
|
632
664
|
``Ascend`` ``GPU`` ``CPU``
|
|
633
665
|
|
|
634
666
|
Examples:
|
|
667
|
+
>>> from mindspore import dtype as mstype
|
|
668
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
635
669
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
636
670
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
637
671
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -667,6 +701,8 @@ def coo_sqrt(x: COOTensor) -> COOTensor:
|
|
|
667
701
|
``Ascend`` ``GPU`` ``CPU``
|
|
668
702
|
|
|
669
703
|
Examples:
|
|
704
|
+
>>> from mindspore import dtype as mstype
|
|
705
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
670
706
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
671
707
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
672
708
|
>>> shape = (3, 4)
|
|
@@ -681,11 +717,11 @@ def coo_sqrt(x: COOTensor) -> COOTensor:
|
|
|
681
717
|
|
|
682
718
|
|
|
683
719
|
def csr_log(x: CSRTensor) -> CSRTensor:
|
|
684
|
-
"""
|
|
720
|
+
r"""
|
|
685
721
|
Returns the natural logarithm of a CSRTensor element-wise.
|
|
686
722
|
|
|
687
723
|
.. math::
|
|
688
|
-
y_i = log_e(x_i)
|
|
724
|
+
y_i = \log_e(x_i)
|
|
689
725
|
|
|
690
726
|
.. warning::
|
|
691
727
|
If the input value of operator Log is within the range (0, 0.01] or [0.95, 1.05], the output accuracy may
|
|
@@ -706,6 +742,8 @@ def csr_log(x: CSRTensor) -> CSRTensor:
|
|
|
706
742
|
``Ascend`` ``GPU`` ``CPU``
|
|
707
743
|
|
|
708
744
|
Examples:
|
|
745
|
+
>>> from mindspore import dtype as mstype
|
|
746
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
709
747
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
710
748
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
711
749
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -721,11 +759,11 @@ def csr_log(x: CSRTensor) -> CSRTensor:
|
|
|
721
759
|
|
|
722
760
|
|
|
723
761
|
def coo_log(x: COOTensor) -> COOTensor:
|
|
724
|
-
"""
|
|
762
|
+
r"""
|
|
725
763
|
Returns the natural logarithm of a COOTensor element-wise.
|
|
726
764
|
|
|
727
765
|
.. math::
|
|
728
|
-
y_i = log_e(x_i)
|
|
766
|
+
y_i = \log_e(x_i)
|
|
729
767
|
|
|
730
768
|
.. warning::
|
|
731
769
|
If the input value of operator Log is within the range (0, 0.01] or [0.95, 1.05], the output accuracy may
|
|
@@ -746,6 +784,8 @@ def coo_log(x: COOTensor) -> COOTensor:
|
|
|
746
784
|
``Ascend`` ``GPU`` ``CPU``
|
|
747
785
|
|
|
748
786
|
Examples:
|
|
787
|
+
>>> from mindspore import dtype as mstype
|
|
788
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
749
789
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
750
790
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
751
791
|
>>> shape = (3, 4)
|
|
@@ -785,6 +825,8 @@ def csr_isnan(x: CSRTensor) -> CSRTensor:
|
|
|
785
825
|
``Ascend`` ``GPU`` ``CPU``
|
|
786
826
|
|
|
787
827
|
Examples:
|
|
828
|
+
>>> from mindspore import dtype as mstype
|
|
829
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
788
830
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
789
831
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
790
832
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -825,6 +867,8 @@ def coo_isnan(x: COOTensor) -> COOTensor:
|
|
|
825
867
|
``Ascend`` ``GPU`` ``CPU``
|
|
826
868
|
|
|
827
869
|
Examples:
|
|
870
|
+
>>> from mindspore import dtype as mstype
|
|
871
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
828
872
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
829
873
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
830
874
|
>>> shape = (3, 4)
|
|
@@ -839,12 +883,12 @@ def coo_isnan(x: COOTensor) -> COOTensor:
|
|
|
839
883
|
|
|
840
884
|
|
|
841
885
|
def csr_acos(x: CSRTensor) -> CSRTensor:
|
|
842
|
-
"""
|
|
886
|
+
r"""
|
|
843
887
|
Computes arccosine of input csr_tensors element-wise.
|
|
844
888
|
|
|
845
889
|
.. math::
|
|
846
890
|
|
|
847
|
-
out_i = cos^{-1}(x_i)
|
|
891
|
+
out_i = \cos^{-1}(x_i)
|
|
848
892
|
|
|
849
893
|
Args:
|
|
850
894
|
x (CSRTensor): Input CSRTensor.
|
|
@@ -861,6 +905,8 @@ def csr_acos(x: CSRTensor) -> CSRTensor:
|
|
|
861
905
|
``Ascend`` ``GPU`` ``CPU``
|
|
862
906
|
|
|
863
907
|
Examples:
|
|
908
|
+
>>> from mindspore import dtype as mstype
|
|
909
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
864
910
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
865
911
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
866
912
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -876,12 +922,12 @@ def csr_acos(x: CSRTensor) -> CSRTensor:
|
|
|
876
922
|
|
|
877
923
|
|
|
878
924
|
def coo_acos(x: COOTensor) -> COOTensor:
|
|
879
|
-
"""
|
|
925
|
+
r"""
|
|
880
926
|
Computes arccosine of input coo_tensors element-wise.
|
|
881
927
|
|
|
882
928
|
.. math::
|
|
883
929
|
|
|
884
|
-
out_i = cos^{-1}(x_i)
|
|
930
|
+
out_i = \cos^{-1}(x_i)
|
|
885
931
|
|
|
886
932
|
Args:
|
|
887
933
|
x (COOTensor): Input COOTensor.
|
|
@@ -897,6 +943,8 @@ def coo_acos(x: COOTensor) -> COOTensor:
|
|
|
897
943
|
``Ascend`` ``GPU`` ``CPU``
|
|
898
944
|
|
|
899
945
|
Examples:
|
|
946
|
+
>>> from mindspore import dtype as mstype
|
|
947
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
900
948
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
901
949
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
902
950
|
>>> shape = (3, 4)
|
|
@@ -932,6 +980,8 @@ def csr_floor(x: CSRTensor) -> CSRTensor:
|
|
|
932
980
|
``Ascend`` ``GPU`` ``CPU``
|
|
933
981
|
|
|
934
982
|
Examples:
|
|
983
|
+
>>> from mindspore import dtype as mstype
|
|
984
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
935
985
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
936
986
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
937
987
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -968,6 +1018,8 @@ def coo_floor(x: COOTensor) -> COOTensor:
|
|
|
968
1018
|
``Ascend`` ``GPU`` ``CPU``
|
|
969
1019
|
|
|
970
1020
|
Examples:
|
|
1021
|
+
>>> from mindspore import dtype as mstype
|
|
1022
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
971
1023
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
972
1024
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
973
1025
|
>>> shape = (3, 4)
|
|
@@ -987,7 +1039,7 @@ def csr_atan(x: CSRTensor) -> CSRTensor:
|
|
|
987
1039
|
|
|
988
1040
|
.. math::
|
|
989
1041
|
|
|
990
|
-
out_i = tan^{-1}(x_i)
|
|
1042
|
+
out_i = \tan^{-1}(x_i)
|
|
991
1043
|
|
|
992
1044
|
Args:
|
|
993
1045
|
x (CSRTensor): The data type should be one of the following types: float16, float32.
|
|
@@ -1003,6 +1055,8 @@ def csr_atan(x: CSRTensor) -> CSRTensor:
|
|
|
1003
1055
|
``Ascend`` ``GPU`` ``CPU``
|
|
1004
1056
|
|
|
1005
1057
|
Examples:
|
|
1058
|
+
>>> from mindspore import dtype as mstype
|
|
1059
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
1006
1060
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
1007
1061
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
1008
1062
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -1018,12 +1072,12 @@ def csr_atan(x: CSRTensor) -> CSRTensor:
|
|
|
1018
1072
|
|
|
1019
1073
|
|
|
1020
1074
|
def coo_atan(x: COOTensor) -> COOTensor:
|
|
1021
|
-
"""
|
|
1075
|
+
r"""
|
|
1022
1076
|
Computes the trigonometric inverse tangent of the input element-wise.
|
|
1023
1077
|
|
|
1024
1078
|
.. math::
|
|
1025
1079
|
|
|
1026
|
-
out_i = tan^{-1}(x_i)
|
|
1080
|
+
out_i = \tan^{-1}(x_i)
|
|
1027
1081
|
|
|
1028
1082
|
Args:
|
|
1029
1083
|
x (COOTensor): The data type should be one of the following types: float16, float32.
|
|
@@ -1039,6 +1093,8 @@ def coo_atan(x: COOTensor) -> COOTensor:
|
|
|
1039
1093
|
``Ascend`` ``GPU`` ``CPU``
|
|
1040
1094
|
|
|
1041
1095
|
Examples:
|
|
1096
|
+
>>> from mindspore import dtype as mstype
|
|
1097
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
1042
1098
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
1043
1099
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
1044
1100
|
>>> shape = (3, 4)
|
|
@@ -1073,6 +1129,8 @@ def csr_square(x: CSRTensor) -> CSRTensor:
|
|
|
1073
1129
|
``Ascend`` ``GPU`` ``CPU``
|
|
1074
1130
|
|
|
1075
1131
|
Examples:
|
|
1132
|
+
>>> from mindspore import dtype as mstype
|
|
1133
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
1076
1134
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
1077
1135
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
1078
1136
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -1108,6 +1166,8 @@ def coo_square(x: COOTensor) -> COOTensor:
|
|
|
1108
1166
|
``Ascend`` ``GPU`` ``CPU``
|
|
1109
1167
|
|
|
1110
1168
|
Examples:
|
|
1169
|
+
>>> from mindspore import dtype as mstype
|
|
1170
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
1111
1171
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
1112
1172
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
1113
1173
|
>>> shape = (3, 4)
|
|
@@ -1145,6 +1205,8 @@ def csr_relu6(x: CSRTensor) -> CSRTensor:
|
|
|
1145
1205
|
``Ascend`` ``GPU`` ``CPU``
|
|
1146
1206
|
|
|
1147
1207
|
Examples:
|
|
1208
|
+
>>> from mindspore import dtype as mstype
|
|
1209
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
1148
1210
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
1149
1211
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
1150
1212
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -1183,6 +1245,8 @@ def coo_relu6(x: COOTensor) -> COOTensor:
|
|
|
1183
1245
|
``Ascend`` ``GPU`` ``CPU``
|
|
1184
1246
|
|
|
1185
1247
|
Examples:
|
|
1248
|
+
>>> from mindspore import dtype as mstype
|
|
1249
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
1186
1250
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
1187
1251
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
1188
1252
|
>>> shape = (3, 4)
|
|
@@ -1217,6 +1281,8 @@ def csr_sinh(x: CSRTensor) -> CSRTensor:
|
|
|
1217
1281
|
``Ascend`` ``GPU`` ``CPU``
|
|
1218
1282
|
|
|
1219
1283
|
Examples:
|
|
1284
|
+
>>> from mindspore import dtype as mstype
|
|
1285
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
1220
1286
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
1221
1287
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
1222
1288
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -1252,6 +1318,8 @@ def coo_sinh(x: COOTensor) -> COOTensor:
|
|
|
1252
1318
|
``Ascend`` ``GPU`` ``CPU``
|
|
1253
1319
|
|
|
1254
1320
|
Examples:
|
|
1321
|
+
>>> from mindspore import dtype as mstype
|
|
1322
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
1255
1323
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
1256
1324
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
1257
1325
|
>>> shape = (3, 4)
|
|
@@ -1287,6 +1355,8 @@ def csr_ceil(x: CSRTensor) -> CSRTensor:
|
|
|
1287
1355
|
``Ascend`` ``GPU`` ``CPU``
|
|
1288
1356
|
|
|
1289
1357
|
Examples:
|
|
1358
|
+
>>> from mindspore import dtype as mstype
|
|
1359
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
1290
1360
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
1291
1361
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
1292
1362
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -1323,6 +1393,8 @@ def coo_ceil(x: COOTensor) -> COOTensor:
|
|
|
1323
1393
|
``Ascend`` ``GPU`` ``CPU``
|
|
1324
1394
|
|
|
1325
1395
|
Examples:
|
|
1396
|
+
>>> from mindspore import dtype as mstype
|
|
1397
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
1326
1398
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
1327
1399
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
1328
1400
|
>>> shape = (3, 4)
|
|
@@ -1360,6 +1432,8 @@ def csr_cosh(x: CSRTensor) -> CSRTensor:
|
|
|
1360
1432
|
``Ascend`` ``GPU`` ``CPU``
|
|
1361
1433
|
|
|
1362
1434
|
Examples:
|
|
1435
|
+
>>> from mindspore import dtype as mstype
|
|
1436
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
1363
1437
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
1364
1438
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
1365
1439
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -1398,6 +1472,8 @@ def coo_cosh(x: COOTensor) -> COOTensor:
|
|
|
1398
1472
|
``Ascend`` ``GPU`` ``CPU``
|
|
1399
1473
|
|
|
1400
1474
|
Examples:
|
|
1475
|
+
>>> from mindspore import dtype as mstype
|
|
1476
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
1401
1477
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
1402
1478
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
1403
1479
|
>>> shape = (3, 4)
|
|
@@ -1434,6 +1510,8 @@ def csr_softsign(x: CSRTensor) -> CSRTensor:
|
|
|
1434
1510
|
``Ascend`` ``GPU`` ``CPU``
|
|
1435
1511
|
|
|
1436
1512
|
Examples:
|
|
1513
|
+
>>> from mindspore import dtype as mstype
|
|
1514
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
1437
1515
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
1438
1516
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
1439
1517
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -1471,6 +1549,8 @@ def coo_softsign(x: COOTensor) -> COOTensor:
|
|
|
1471
1549
|
``Ascend`` ``GPU`` ``CPU``
|
|
1472
1550
|
|
|
1473
1551
|
Examples:
|
|
1552
|
+
>>> from mindspore import dtype as mstype
|
|
1553
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
1474
1554
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
1475
1555
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
1476
1556
|
>>> shape = (3, 4)
|
|
@@ -1489,7 +1569,7 @@ def csr_log1p(x: CSRTensor) -> CSRTensor:
|
|
|
1489
1569
|
Returns the natural logarithm of one plus the input CSRTensor element-wise.
|
|
1490
1570
|
|
|
1491
1571
|
.. math::
|
|
1492
|
-
out_i = {log_e}(x_i + 1)
|
|
1572
|
+
out_i = \text{log_e}(x_i + 1)
|
|
1493
1573
|
|
|
1494
1574
|
Args:
|
|
1495
1575
|
x (CSRTensor): The input CSRTensor. With float16 or float32 data type.
|
|
@@ -1506,6 +1586,8 @@ def csr_log1p(x: CSRTensor) -> CSRTensor:
|
|
|
1506
1586
|
``Ascend`` ``GPU`` ``CPU``
|
|
1507
1587
|
|
|
1508
1588
|
Examples:
|
|
1589
|
+
>>> from mindspore import dtype as mstype
|
|
1590
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
1509
1591
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
1510
1592
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
1511
1593
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -1525,7 +1607,7 @@ def coo_log1p(x: COOTensor) -> COOTensor:
|
|
|
1525
1607
|
Returns the natural logarithm of one plus the input COOTensor element-wise.
|
|
1526
1608
|
|
|
1527
1609
|
.. math::
|
|
1528
|
-
out_i = {log_e}(x_i + 1)
|
|
1610
|
+
out_i = \text{log_e}(x_i + 1)
|
|
1529
1611
|
|
|
1530
1612
|
Args:
|
|
1531
1613
|
x (COOTensor): The input COOTensor, should have dtype of float16 or float32
|
|
@@ -1542,6 +1624,8 @@ def coo_log1p(x: COOTensor) -> COOTensor:
|
|
|
1542
1624
|
``Ascend`` ``GPU`` ``CPU``
|
|
1543
1625
|
|
|
1544
1626
|
Examples:
|
|
1627
|
+
>>> from mindspore import dtype as mstype
|
|
1628
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
1545
1629
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
1546
1630
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
1547
1631
|
>>> shape = (3, 4)
|
|
@@ -1576,6 +1660,8 @@ def csr_round(x: CSRTensor) -> CSRTensor:
|
|
|
1576
1660
|
``Ascend`` ``GPU`` ``CPU``
|
|
1577
1661
|
|
|
1578
1662
|
Examples:
|
|
1663
|
+
>>> from mindspore import dtype as mstype
|
|
1664
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
1579
1665
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
1580
1666
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
1581
1667
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -1611,6 +1697,8 @@ def coo_round(x: COOTensor) -> COOTensor:
|
|
|
1611
1697
|
``Ascend`` ``GPU`` ``CPU``
|
|
1612
1698
|
|
|
1613
1699
|
Examples:
|
|
1700
|
+
>>> from mindspore import dtype as mstype
|
|
1701
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
1614
1702
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
1615
1703
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
1616
1704
|
>>> shape = (3, 4)
|
|
@@ -1648,6 +1736,8 @@ def csr_tanh(x: CSRTensor) -> CSRTensor:
|
|
|
1648
1736
|
``Ascend`` ``GPU`` ``CPU``
|
|
1649
1737
|
|
|
1650
1738
|
Examples:
|
|
1739
|
+
>>> from mindspore import dtype as mstype
|
|
1740
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
1651
1741
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
1652
1742
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
1653
1743
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -1686,6 +1776,8 @@ def coo_tanh(x: COOTensor) -> COOTensor:
|
|
|
1686
1776
|
``Ascend`` ``GPU`` ``CPU``
|
|
1687
1777
|
|
|
1688
1778
|
Examples:
|
|
1779
|
+
>>> from mindspore import dtype as mstype
|
|
1780
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
1689
1781
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
1690
1782
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
1691
1783
|
>>> shape = (3, 4)
|
|
@@ -1720,6 +1812,8 @@ def csr_asinh(x: CSRTensor) -> CSRTensor:
|
|
|
1720
1812
|
``Ascend`` ``GPU`` ``CPU``
|
|
1721
1813
|
|
|
1722
1814
|
Examples:
|
|
1815
|
+
>>> from mindspore import dtype as mstype
|
|
1816
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
1723
1817
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
1724
1818
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
1725
1819
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -1755,6 +1849,8 @@ def coo_asinh(x: COOTensor) -> COOTensor:
|
|
|
1755
1849
|
``Ascend`` ``GPU`` ``CPU``
|
|
1756
1850
|
|
|
1757
1851
|
Examples:
|
|
1852
|
+
>>> from mindspore import dtype as mstype
|
|
1853
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
1758
1854
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
1759
1855
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
1760
1856
|
>>> shape = (3, 4)
|
|
@@ -1789,6 +1885,8 @@ def csr_neg(x: CSRTensor) -> CSRTensor:
|
|
|
1789
1885
|
``Ascend`` ``GPU`` ``CPU``
|
|
1790
1886
|
|
|
1791
1887
|
Examples:
|
|
1888
|
+
>>> from mindspore import dtype as mstype
|
|
1889
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
1792
1890
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
1793
1891
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
1794
1892
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -1824,6 +1922,8 @@ def coo_neg(x: COOTensor) -> COOTensor:
|
|
|
1824
1922
|
``Ascend`` ``GPU`` ``CPU``
|
|
1825
1923
|
|
|
1826
1924
|
Examples:
|
|
1925
|
+
>>> from mindspore import dtype as mstype
|
|
1926
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
1827
1927
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
1828
1928
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
1829
1929
|
>>> shape = (3, 4)
|
|
@@ -1858,6 +1958,8 @@ def csr_acosh(x: CSRTensor) -> CSRTensor:
|
|
|
1858
1958
|
``Ascend`` ``GPU`` ``CPU``
|
|
1859
1959
|
|
|
1860
1960
|
Examples:
|
|
1961
|
+
>>> from mindspore import dtype as mstype
|
|
1962
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
1861
1963
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
1862
1964
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
1863
1965
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -1878,7 +1980,7 @@ def coo_acosh(x: COOTensor) -> COOTensor:
|
|
|
1878
1980
|
|
|
1879
1981
|
.. math::
|
|
1880
1982
|
|
|
1881
|
-
|
|
1983
|
+
y_i = \cosh^{-1}(x_i)
|
|
1882
1984
|
|
|
1883
1985
|
.. warning::
|
|
1884
1986
|
Given an input COOTensor x, the function computes inverse hyperbolic cosine of every element.
|
|
@@ -1897,6 +1999,8 @@ def coo_acosh(x: COOTensor) -> COOTensor:
|
|
|
1897
1999
|
``Ascend`` ``GPU`` ``CPU``
|
|
1898
2000
|
|
|
1899
2001
|
Examples:
|
|
2002
|
+
>>> from mindspore import dtype as mstype
|
|
2003
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
1900
2004
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
1901
2005
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
1902
2006
|
>>> shape = (3, 4)
|
|
@@ -1936,6 +2040,8 @@ def csr_isinf(x: CSRTensor) -> CSRTensor:
|
|
|
1936
2040
|
``GPU`` ``CPU``
|
|
1937
2041
|
|
|
1938
2042
|
Examples:
|
|
2043
|
+
>>> from mindspore import dtype as mstype
|
|
2044
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
1939
2045
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
1940
2046
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
1941
2047
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -1976,6 +2082,8 @@ def coo_isinf(x: COOTensor) -> COOTensor:
|
|
|
1976
2082
|
``GPU`` ``CPU``
|
|
1977
2083
|
|
|
1978
2084
|
Examples:
|
|
2085
|
+
>>> from mindspore import dtype as mstype
|
|
2086
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
1979
2087
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
1980
2088
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
1981
2089
|
>>> shape = (3, 4)
|
|
@@ -1990,7 +2098,7 @@ def coo_isinf(x: COOTensor) -> COOTensor:
|
|
|
1990
2098
|
|
|
1991
2099
|
|
|
1992
2100
|
def csr_atanh(x: CSRTensor) -> CSRTensor:
|
|
1993
|
-
"""
|
|
2101
|
+
r"""
|
|
1994
2102
|
Computes inverse hyperbolic tangent of the input element-wise.
|
|
1995
2103
|
|
|
1996
2104
|
.. math::
|
|
@@ -2016,6 +2124,8 @@ def csr_atanh(x: CSRTensor) -> CSRTensor:
|
|
|
2016
2124
|
``Ascend`` ``GPU`` ``CPU``
|
|
2017
2125
|
|
|
2018
2126
|
Examples:
|
|
2127
|
+
>>> from mindspore import dtype as mstype
|
|
2128
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
2019
2129
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
2020
2130
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
2021
2131
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -2031,12 +2141,12 @@ def csr_atanh(x: CSRTensor) -> CSRTensor:
|
|
|
2031
2141
|
|
|
2032
2142
|
|
|
2033
2143
|
def coo_atanh(x: COOTensor) -> COOTensor:
|
|
2034
|
-
"""
|
|
2144
|
+
r"""
|
|
2035
2145
|
Computes inverse hyperbolic tangent of the input element-wise.
|
|
2036
2146
|
|
|
2037
2147
|
.. math::
|
|
2038
2148
|
|
|
2039
|
-
out_i = tanh^{-1}(x_{i})
|
|
2149
|
+
out_i = \tanh^{-1}(x_{i})
|
|
2040
2150
|
|
|
2041
2151
|
.. warning::
|
|
2042
2152
|
This is an experimental API that is subject to change or deletion.
|
|
@@ -2056,6 +2166,8 @@ def coo_atanh(x: COOTensor) -> COOTensor:
|
|
|
2056
2166
|
``Ascend`` ``GPU`` ``CPU``
|
|
2057
2167
|
|
|
2058
2168
|
Examples:
|
|
2169
|
+
>>> from mindspore import dtype as mstype
|
|
2170
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
2059
2171
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
2060
2172
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
2061
2173
|
>>> shape = (3, 4)
|
|
@@ -2095,6 +2207,8 @@ def csr_sigmoid(x: CSRTensor) -> CSRTensor:
|
|
|
2095
2207
|
``Ascend`` ``GPU`` ``CPU``
|
|
2096
2208
|
|
|
2097
2209
|
Examples:
|
|
2210
|
+
>>> from mindspore import dtype as mstype
|
|
2211
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
2098
2212
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
2099
2213
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
2100
2214
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -2135,6 +2249,8 @@ def coo_sigmoid(x: COOTensor) -> COOTensor:
|
|
|
2135
2249
|
``Ascend`` ``GPU`` ``CPU``
|
|
2136
2250
|
|
|
2137
2251
|
Examples:
|
|
2252
|
+
>>> from mindspore import dtype as mstype
|
|
2253
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
2138
2254
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
2139
2255
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
2140
2256
|
>>> shape = (3, 4)
|
|
@@ -2169,6 +2285,8 @@ def csr_abs(x: CSRTensor) -> CSRTensor:
|
|
|
2169
2285
|
``Ascend`` ``GPU`` ``CPU``
|
|
2170
2286
|
|
|
2171
2287
|
Examples:
|
|
2288
|
+
>>> from mindspore import dtype as mstype
|
|
2289
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
2172
2290
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
2173
2291
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
2174
2292
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -2204,6 +2322,8 @@ def coo_abs(x: COOTensor) -> COOTensor:
|
|
|
2204
2322
|
``Ascend`` ``GPU`` ``CPU``
|
|
2205
2323
|
|
|
2206
2324
|
Examples:
|
|
2325
|
+
>>> from mindspore import dtype as mstype
|
|
2326
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
2207
2327
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
2208
2328
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
2209
2329
|
>>> shape = (3, 4)
|
|
@@ -2218,12 +2338,12 @@ def coo_abs(x: COOTensor) -> COOTensor:
|
|
|
2218
2338
|
|
|
2219
2339
|
|
|
2220
2340
|
def csr_sin(x: CSRTensor) -> CSRTensor:
|
|
2221
|
-
"""
|
|
2341
|
+
r"""
|
|
2222
2342
|
Computes sine of the input element-wise.
|
|
2223
2343
|
|
|
2224
2344
|
.. math::
|
|
2225
2345
|
|
|
2226
|
-
out_i = sin(x_i)
|
|
2346
|
+
out_i = \sin(x_i)
|
|
2227
2347
|
|
|
2228
2348
|
Args:
|
|
2229
2349
|
x (CSRTensor): Input CSRTensor.
|
|
@@ -2240,6 +2360,8 @@ def csr_sin(x: CSRTensor) -> CSRTensor:
|
|
|
2240
2360
|
``Ascend`` ``GPU`` ``CPU``
|
|
2241
2361
|
|
|
2242
2362
|
Examples:
|
|
2363
|
+
>>> from mindspore import dtype as mstype
|
|
2364
|
+
>>> from mindspore import Tensor, ops, CSRTensor
|
|
2243
2365
|
>>> indptr = Tensor([0, 1, 2, 2], dtype=mstype.int32)
|
|
2244
2366
|
>>> indices = Tensor([3, 0], dtype=mstype.int32)
|
|
2245
2367
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
@@ -2255,12 +2377,12 @@ def csr_sin(x: CSRTensor) -> CSRTensor:
|
|
|
2255
2377
|
|
|
2256
2378
|
|
|
2257
2379
|
def coo_sin(x: COOTensor) -> COOTensor:
|
|
2258
|
-
"""
|
|
2380
|
+
r"""
|
|
2259
2381
|
Computes sine of the input element-wise.
|
|
2260
2382
|
|
|
2261
2383
|
.. math::
|
|
2262
2384
|
|
|
2263
|
-
out_i = sin(x_i)
|
|
2385
|
+
out_i = \sin(x_i)
|
|
2264
2386
|
|
|
2265
2387
|
Args:
|
|
2266
2388
|
x (COOTensor): Input COOTensor.
|
|
@@ -2277,6 +2399,8 @@ def coo_sin(x: COOTensor) -> COOTensor:
|
|
|
2277
2399
|
``Ascend`` ``GPU`` ``CPU``
|
|
2278
2400
|
|
|
2279
2401
|
Examples:
|
|
2402
|
+
>>> from mindspore import dtype as mstype
|
|
2403
|
+
>>> from mindspore import Tensor, ops, COOTensor
|
|
2280
2404
|
>>> indices = Tensor([[0, 1], [1, 2]], dtype=mstype.int64)
|
|
2281
2405
|
>>> values = Tensor([-1, 2], dtype=mstype.float32)
|
|
2282
2406
|
>>> shape = (3, 4)
|
|
@@ -2290,14 +2414,16 @@ def coo_sin(x: COOTensor) -> COOTensor:
|
|
|
2290
2414
|
return COOTensor(x.indices, math_func.sin(x.values), x.shape)
|
|
2291
2415
|
|
|
2292
2416
|
|
|
2293
|
-
__all__ = [
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2417
|
+
__all__ = [
|
|
2418
|
+
"csr_cos", "csr_tan", "csr_exp", "csr_inv", "csr_relu", "csr_expm1", "csr_isfinite",
|
|
2419
|
+
"csr_asin", "csr_sqrt", "csr_log", "csr_isnan", "csr_acos", "csr_floor", "csr_atan",
|
|
2420
|
+
"csr_square", "csr_relu6", "csr_sinh", "csr_ceil", "csr_cosh", "csr_softsign",
|
|
2421
|
+
"csr_log1p", "csr_round", "csr_tanh", "csr_asinh", "csr_neg", "csr_acosh", "csr_isinf",
|
|
2422
|
+
"csr_atanh", "csr_sigmoid", "csr_abs", "csr_sin", "coo_cos", "coo_tan", "coo_exp",
|
|
2423
|
+
"coo_inv", "coo_relu", "coo_expm1", "coo_isfinite", "coo_asin", "coo_sqrt", "coo_log",
|
|
2424
|
+
"coo_isnan", "coo_acos", "coo_floor", "coo_atan", "coo_square", "coo_relu6", "coo_sinh",
|
|
2425
|
+
"coo_ceil", "coo_cosh", "coo_softsign", "coo_log1p", "coo_round", "coo_tanh",
|
|
2426
|
+
"coo_asinh", "coo_neg", "coo_acosh", "coo_isinf", "coo_atanh", "coo_sigmoid", "coo_abs",
|
|
2427
|
+
"coo_sin"
|
|
2428
|
+
]
|
|
2303
2429
|
__all__.sort()
|