You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

__init__.py 2.2 kB

code check for master # Conflicts: # mindspore/common/initializer.py # mindspore/nn/cell.py # # 似乎您正在做一个拣选提交。如果不对,请删除文件 # .git/CHERRY_PICK_HEAD # 然后重试。 # 请为您的变更输入提交说明。以 '#' 开始的行将被忽略,而一个空的提交 # 说明将会终止提交。 # # 日期: Fri Aug 13 18:40:19 2021 +0800 # # 位于分支 code_review_r1.3 # 您的分支与上游分支 'ma/r1.3' 一致。 # # 您在执行拣选提交 ffda6be35c 的操作。 # # 要提交的变更: # 修改: mindspore/common/__init__.py # 修改: mindspore/common/_register_for_tensor.py # 修改: mindspore/common/api.py # 修改: mindspore/common/dtype.py # 修改: mindspore/common/initializer.py # 修改: mindspore/common/monad.py # 修改: mindspore/common/parameter.py # 修改: mindspore/common/seed.py # 修改: mindspore/common/tensor.py # 修改: mindspore/nn/cell.py # 修改: mindspore/nn/metrics/__init__.py # 修改: mindspore/nn/metrics/confusion_matrix.py # 修改: mindspore/nn/metrics/error.py # 修改: mindspore/nn/metrics/fbeta.py # 修改: mindspore/nn/metrics/loss.py # 修改: mindspore/nn/metrics/metric.py # 修改: mindspore/nn/metrics/precision.py # 修改: mindspore/nn/metrics/recall.py # 修改: mindspore/nn/metrics/topk.py # 修改: mindspore/train/callback/_checkpoint.py # 修改: mindspore/train/model.py # 修改: mindspore/train/serialization.py # # Conflicts: # mindspore/common/api.py # mindspore/common/initializer.py # mindspore/nn/metrics/confusion_matrix.py # # 似乎您正在做一个拣选提交。如果不对,请删除文件 # .git/CHERRY_PICK_HEAD # 然后重试。 # 请为您的变更输入提交说明。以 '#' 开始的行将被忽略,而一个空的提交 # 说明将会终止提交。 # # 日期: Fri Aug 13 18:40:19 2021 +0800 # # 位于分支 code_review_master # 您的分支与上游分支 'ma/master' 一致。 # # 您在执行拣选提交 743f9fbff3 的操作。 # # 要提交的变更: # 修改: mindspore/common/__init__.py # 修改: mindspore/common/_monad.py # 修改: mindspore/common/_register_for_tensor.py # 修改: mindspore/common/api.py # 修改: mindspore/common/dtype.py # 修改: mindspore/common/initializer.py # 修改: mindspore/common/parameter.py # 修改: mindspore/common/seed.py # 修改: mindspore/common/tensor.py # 修改: mindspore/nn/cell.py # 修改: mindspore/nn/metrics/__init__.py # 修改: mindspore/nn/metrics/confusion_matrix.py # 修改: mindspore/nn/metrics/error.py # 修改: mindspore/nn/metrics/fbeta.py # 修改: mindspore/nn/metrics/loss.py # 修改: mindspore/nn/metrics/metric.py # 修改: mindspore/nn/metrics/precision.py # 修改: mindspore/nn/metrics/recall.py # 修改: mindspore/nn/metrics/topk.py # 修改: mindspore/train/callback/_checkpoint.py # 修改: mindspore/train/model.py # 修改: mindspore/train/serialization.py #
4 years ago
5 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Copyright 2020-2021 Huawei Technologies Co., Ltd
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. # ============================================================================
  15. """Top-level reference to dtype of common module."""
  16. from . import dtype
  17. from .api import ms_function
  18. from .dtype import Type, int8, byte, int16, short, int32, intc, int64, intp, \
  19. uint8, ubyte, uint16, ushort, uint32, uintc, uint64, uintp, float16, half, \
  20. float32, single, float64, double, bool_, float_, list_, tuple_, int_, \
  21. uint, number, tensor, string, type_none, tensor_type, Int, \
  22. complex64, complex128, dtype_to_nptype, issubclass_, \
  23. dtype_to_pytype, pytype_to_dtype, get_py_obj_dtype
  24. from .dump import set_dump
  25. from .parameter import Parameter, ParameterTuple
  26. from .seed import set_seed, get_seed
  27. from .tensor import Tensor, RowTensor, SparseTensor, CSRTensor
  28. # symbols from dtype
  29. __all__ = [
  30. "int8", "byte",
  31. "int16", "short",
  32. "int32", "intc",
  33. "int64", "intp",
  34. "uint8", "ubyte",
  35. "uint16", "ushort",
  36. "uint32", "uintc",
  37. "uint64", "uintp",
  38. "float16", "half",
  39. "float32", "single",
  40. "float64", "double",
  41. "bool_", "float_",
  42. "list_", "tuple_",
  43. "int_", "uint",
  44. "number", "tensor",
  45. "string", "type_none",
  46. "tensor_type",
  47. "Type", "Int",
  48. "complex64", "complex128",
  49. # __method__ from dtype
  50. "dtype_to_nptype", "issubclass_", "dtype_to_pytype",
  51. "pytype_to_dtype", "get_py_obj_dtype"
  52. ]
  53. __all__.extend([
  54. "Tensor", "RowTensor", "SparseTensor", "CSRTensor", # tensor
  55. 'ms_function', # api
  56. 'Parameter', 'ParameterTuple', # parameter
  57. "dtype",
  58. "set_seed", "get_seed", # random seed
  59. "set_dump"
  60. ])