Browse Source

replace '0' to nullptr and fix sentencePiece api doc

tags/v1.1.0
xulei2020 5 years ago
parent
commit
2919373821
2 changed files with 13 additions and 13 deletions
  1. +12
    -12
      mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv/lite_mat.cc
  2. +1
    -1
      mindspore/dataset/text/utils.py

+ 12
- 12
mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv/lite_mat.cc View File

@@ -29,7 +29,7 @@ namespace mindspore {
namespace dataset { namespace dataset {


LiteMat::LiteMat() { LiteMat::LiteMat() {
data_ptr_ = 0;
data_ptr_ = nullptr;
elem_size_ = 0; elem_size_ = 0;
width_ = 0; width_ = 0;
height_ = 0; height_ = 0;
@@ -38,11 +38,11 @@ LiteMat::LiteMat() {
dims_ = 0; dims_ = 0;
size_ = 0; size_ = 0;
data_type_ = LDataType::UINT8; data_type_ = LDataType::UINT8;
ref_count_ = 0;
ref_count_ = nullptr;
} }


LiteMat::LiteMat(int width, LDataType data_type) { LiteMat::LiteMat(int width, LDataType data_type) {
data_ptr_ = 0;
data_ptr_ = nullptr;
elem_size_ = 0; elem_size_ = 0;
width_ = 0; width_ = 0;
height_ = 0; height_ = 0;
@@ -50,13 +50,13 @@ LiteMat::LiteMat(int width, LDataType data_type) {
c_step_ = 0; c_step_ = 0;
dims_ = 0; dims_ = 0;
data_type_ = LDataType::UINT8; data_type_ = LDataType::UINT8;
ref_count_ = 0;
ref_count_ = nullptr;
size_ = 0; size_ = 0;
Init(width, data_type); Init(width, data_type);
} }


LiteMat::LiteMat(int width, int height, LDataType data_type) { LiteMat::LiteMat(int width, int height, LDataType data_type) {
data_ptr_ = 0;
data_ptr_ = nullptr;
elem_size_ = 0; elem_size_ = 0;
width_ = 0; width_ = 0;
height_ = 0; height_ = 0;
@@ -64,13 +64,13 @@ LiteMat::LiteMat(int width, int height, LDataType data_type) {
c_step_ = 0; c_step_ = 0;
dims_ = 0; dims_ = 0;
data_type_ = LDataType::UINT8; data_type_ = LDataType::UINT8;
ref_count_ = 0;
ref_count_ = nullptr;
size_ = 0; size_ = 0;
Init(width, height, data_type); Init(width, height, data_type);
} }


LiteMat::LiteMat(int width, int height, void *p_data, LDataType data_type) { LiteMat::LiteMat(int width, int height, void *p_data, LDataType data_type) {
data_ptr_ = 0;
data_ptr_ = nullptr;
elem_size_ = 0; elem_size_ = 0;
width_ = 0; width_ = 0;
height_ = 0; height_ = 0;
@@ -78,13 +78,13 @@ LiteMat::LiteMat(int width, int height, void *p_data, LDataType data_type) {
c_step_ = 0; c_step_ = 0;
dims_ = 0; dims_ = 0;
data_type_ = LDataType::UINT8; data_type_ = LDataType::UINT8;
ref_count_ = 0;
ref_count_ = nullptr;
size_ = 0; size_ = 0;
Init(width, height, p_data, data_type); Init(width, height, p_data, data_type);
} }


LiteMat::LiteMat(int width, int height, int channel, LDataType data_type) { LiteMat::LiteMat(int width, int height, int channel, LDataType data_type) {
data_ptr_ = 0;
data_ptr_ = nullptr;
elem_size_ = 0; elem_size_ = 0;
width_ = 0; width_ = 0;
height_ = 0; height_ = 0;
@@ -92,13 +92,13 @@ LiteMat::LiteMat(int width, int height, int channel, LDataType data_type) {
c_step_ = 0; c_step_ = 0;
dims_ = 0; dims_ = 0;
data_type_ = LDataType::UINT8; data_type_ = LDataType::UINT8;
ref_count_ = 0;
ref_count_ = nullptr;
size_ = 0; size_ = 0;
Init(width, height, channel, data_type); Init(width, height, channel, data_type);
} }


LiteMat::LiteMat(int width, int height, int channel, void *p_data, LDataType data_type) { LiteMat::LiteMat(int width, int height, int channel, void *p_data, LDataType data_type) {
data_ptr_ = 0;
data_ptr_ = nullptr;
elem_size_ = 0; elem_size_ = 0;
width_ = 0; width_ = 0;
height_ = 0; height_ = 0;
@@ -106,7 +106,7 @@ LiteMat::LiteMat(int width, int height, int channel, void *p_data, LDataType dat
c_step_ = 0; c_step_ = 0;
dims_ = 0; dims_ = 0;
data_type_ = LDataType::UINT8; data_type_ = LDataType::UINT8;
ref_count_ = 0;
ref_count_ = nullptr;
size_ = 0; size_ = 0;
Init(width, height, channel, p_data, data_type); Init(width, height, channel, p_data, data_type);
} }


+ 1
- 1
mindspore/dataset/text/utils.py View File

@@ -156,7 +156,7 @@ class SentencePieceVocab(cde.SentencePieceVocab):
character_coverage(float): Amount of characters covered by the model, good defaults are: 0.9995 for character_coverage(float): Amount of characters covered by the model, good defaults are: 0.9995 for
languages. with rich character set like Japanese or Chinese and 1.0 for other languages with small languages. with rich character set like Japanese or Chinese and 1.0 for other languages with small
character set. character set.
model_type(SentencePieceModel): Choose from unigram (default), bpe, char, or word. The input sentence
model_type(SentencePieceModel): Choose from UNIGRAM (default), BPE, CHAR, or WORD. The input sentence
must be pretokenized when using word type. must be pretokenized when using word type.
params(dict): A dictionary with no incoming parameters. params(dict): A dictionary with no incoming parameters.




Loading…
Cancel
Save