Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
a3062640
M
mindspore
项目概览
magicwindyyd
/
mindspore
与 Fork 源项目一致
Fork自
MindSpore / mindspore
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindspore
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a3062640
编写于
7月 24, 2020
作者:
N
nhussain
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove print calls
上级
06ed9ffd
变更
93
隐藏空白更改
内联
并排
Showing
93 changed file
with
95 addition
and
143 deletion
+95
-143
mindspore/ccsrc/minddata/dataset/engine/datasetops/barrier_op.h
...ore/ccsrc/minddata/dataset/engine/datasetops/barrier_op.h
+4
-0
mindspore/ccsrc/minddata/dataset/engine/datasetops/batch_op.cc
...pore/ccsrc/minddata/dataset/engine/datasetops/batch_op.cc
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/batch_op.h
...spore/ccsrc/minddata/dataset/engine/datasetops/batch_op.h
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/bucket_batch_by_length_op.cc
...ta/dataset/engine/datasetops/bucket_batch_by_length_op.cc
+0
-2
mindspore/ccsrc/minddata/dataset/engine/datasetops/bucket_batch_by_length_op.h
...ata/dataset/engine/datasetops/bucket_batch_by_length_op.h
+1
-4
mindspore/ccsrc/minddata/dataset/engine/datasetops/build_sentence_piece_vocab_op.h
...dataset/engine/datasetops/build_sentence_piece_vocab_op.h
+2
-0
mindspore/ccsrc/minddata/dataset/engine/datasetops/build_vocab_op.cc
...csrc/minddata/dataset/engine/datasetops/build_vocab_op.cc
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/build_vocab_op.h
...ccsrc/minddata/dataset/engine/datasetops/build_vocab_op.h
+1
-0
mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_base_op.h
.../ccsrc/minddata/dataset/engine/datasetops/cache_base_op.h
+3
-0
mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_lookup_op.h
...csrc/minddata/dataset/engine/datasetops/cache_lookup_op.h
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_merge_op.cc
...csrc/minddata/dataset/engine/datasetops/cache_merge_op.cc
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_merge_op.h
...ccsrc/minddata/dataset/engine/datasetops/cache_merge_op.h
+2
-0
mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_op.h
...spore/ccsrc/minddata/dataset/engine/datasetops/cache_op.h
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/concat_op.cc
...ore/ccsrc/minddata/dataset/engine/datasetops/concat_op.cc
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/concat_op.h
...pore/ccsrc/minddata/dataset/engine/datasetops/concat_op.h
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/dataset_op.cc
...re/ccsrc/minddata/dataset/engine/datasetops/dataset_op.cc
+2
-0
mindspore/ccsrc/minddata/dataset/engine/datasetops/dataset_op.h
...ore/ccsrc/minddata/dataset/engine/datasetops/dataset_op.h
+26
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/device_queue_op.cc
...src/minddata/dataset/engine/datasetops/device_queue_op.cc
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/device_queue_op.h
...csrc/minddata/dataset/engine/datasetops/device_queue_op.h
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/epoch_ctrl_op.cc
...ccsrc/minddata/dataset/engine/datasetops/epoch_ctrl_op.cc
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/epoch_ctrl_op.h
.../ccsrc/minddata/dataset/engine/datasetops/epoch_ctrl_op.h
+1
-0
mindspore/ccsrc/minddata/dataset/engine/datasetops/filter_op.cc
...ore/ccsrc/minddata/dataset/engine/datasetops/filter_op.cc
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/filter_op.h
...pore/ccsrc/minddata/dataset/engine/datasetops/filter_op.h
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/map_op.cc
mindspore/ccsrc/minddata/dataset/engine/datasetops/map_op.cc
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/map_op.h
mindspore/ccsrc/minddata/dataset/engine/datasetops/map_op.h
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/parallel_op.h
...re/ccsrc/minddata/dataset/engine/datasetops/parallel_op.h
+2
-0
mindspore/ccsrc/minddata/dataset/engine/datasetops/pipeline_op.h
...re/ccsrc/minddata/dataset/engine/datasetops/pipeline_op.h
+2
-0
mindspore/ccsrc/minddata/dataset/engine/datasetops/project_op.cc
...re/ccsrc/minddata/dataset/engine/datasetops/project_op.cc
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/project_op.h
...ore/ccsrc/minddata/dataset/engine/datasetops/project_op.h
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/rename_op.cc
...ore/ccsrc/minddata/dataset/engine/datasetops/rename_op.cc
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/rename_op.h
...pore/ccsrc/minddata/dataset/engine/datasetops/rename_op.h
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/repeat_op.cc
...ore/ccsrc/minddata/dataset/engine/datasetops/repeat_op.cc
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/repeat_op.h
...pore/ccsrc/minddata/dataset/engine/datasetops/repeat_op.h
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/shuffle_op.cc
...re/ccsrc/minddata/dataset/engine/datasetops/shuffle_op.cc
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/shuffle_op.h
...ore/ccsrc/minddata/dataset/engine/datasetops/shuffle_op.h
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/skip_op.cc
...spore/ccsrc/minddata/dataset/engine/datasetops/skip_op.cc
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/skip_op.h
mindspore/ccsrc/minddata/dataset/engine/datasetops/skip_op.h
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/take_op.cc
...spore/ccsrc/minddata/dataset/engine/datasetops/take_op.cc
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/take_op.h
mindspore/ccsrc/minddata/dataset/engine/datasetops/take_op.h
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/zip_op.cc
mindspore/ccsrc/minddata/dataset/engine/datasetops/zip_op.cc
+1
-1
mindspore/ccsrc/minddata/dataset/engine/datasetops/zip_op.h
mindspore/ccsrc/minddata/dataset/engine/datasetops/zip_op.h
+1
-1
mindspore/ccsrc/minddata/dataset/kernels/data/concatenate_op.h
...pore/ccsrc/minddata/dataset/kernels/data/concatenate_op.h
+0
-1
mindspore/ccsrc/minddata/dataset/kernels/data/duplicate_op.h
mindspore/ccsrc/minddata/dataset/kernels/data/duplicate_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/kernels/data/fill_op.h
mindspore/ccsrc/minddata/dataset/kernels/data/fill_op.h
+0
-1
mindspore/ccsrc/minddata/dataset/kernels/data/mask_op.h
mindspore/ccsrc/minddata/dataset/kernels/data/mask_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/kernels/data/one_hot_op.h
mindspore/ccsrc/minddata/dataset/kernels/data/one_hot_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/kernels/data/pad_end_op.h
mindspore/ccsrc/minddata/dataset/kernels/data/pad_end_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/kernels/data/slice_op.h
mindspore/ccsrc/minddata/dataset/kernels/data/slice_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/kernels/data/to_float16_op.h
...spore/ccsrc/minddata/dataset/kernels/data/to_float16_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/kernels/data/type_cast_op.h
mindspore/ccsrc/minddata/dataset/kernels/data/type_cast_op.h
+0
-1
mindspore/ccsrc/minddata/dataset/kernels/image/auto_contrast_op.h
...e/ccsrc/minddata/dataset/kernels/image/auto_contrast_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/kernels/image/bounding_box_augment_op.h
.../minddata/dataset/kernels/image/bounding_box_augment_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/kernels/image/decode_op.h
mindspore/ccsrc/minddata/dataset/kernels/image/decode_op.h
+0
-1
mindspore/ccsrc/minddata/dataset/kernels/image/equalize_op.h
mindspore/ccsrc/minddata/dataset/kernels/image/equalize_op.h
+0
-3
mindspore/ccsrc/minddata/dataset/kernels/image/hwc_to_chw_op.h
...pore/ccsrc/minddata/dataset/kernels/image/hwc_to_chw_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/kernels/image/invert_op.h
mindspore/ccsrc/minddata/dataset/kernels/image/invert_op.h
+0
-3
mindspore/ccsrc/minddata/dataset/kernels/image/pad_op.h
mindspore/ccsrc/minddata/dataset/kernels/image/pad_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/kernels/image/random_color_adjust_op.h
...c/minddata/dataset/kernels/image/random_color_adjust_op.h
+0
-4
mindspore/ccsrc/minddata/dataset/kernels/image/random_crop_decode_resize_op.h
...data/dataset/kernels/image/random_crop_decode_resize_op.h
+1
-2
mindspore/ccsrc/minddata/dataset/kernels/image/random_crop_op.h
...ore/ccsrc/minddata/dataset/kernels/image/random_crop_op.h
+1
-1
mindspore/ccsrc/minddata/dataset/kernels/image/random_crop_with_bbox_op.h
...minddata/dataset/kernels/image/random_crop_with_bbox_op.h
+1
-1
mindspore/ccsrc/minddata/dataset/kernels/image/random_horizontal_flip_op.h
...inddata/dataset/kernels/image/random_horizontal_flip_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/kernels/image/random_horizontal_flip_with_bbox_op.h
...taset/kernels/image/random_horizontal_flip_with_bbox_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/kernels/image/random_resize_op.h
...e/ccsrc/minddata/dataset/kernels/image/random_resize_op.h
+1
-3
mindspore/ccsrc/minddata/dataset/kernels/image/random_resize_with_bbox_op.h
...nddata/dataset/kernels/image/random_resize_with_bbox_op.h
+1
-1
mindspore/ccsrc/minddata/dataset/kernels/image/random_rotation_op.h
...ccsrc/minddata/dataset/kernels/image/random_rotation_op.h
+0
-4
mindspore/ccsrc/minddata/dataset/kernels/image/random_vertical_flip_op.h
.../minddata/dataset/kernels/image/random_vertical_flip_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/kernels/image/random_vertical_flip_with_bbox_op.h
...dataset/kernels/image/random_vertical_flip_with_bbox_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/kernels/image/rescale_op.h
mindspore/ccsrc/minddata/dataset/kernels/image/rescale_op.h
+1
-1
mindspore/ccsrc/minddata/dataset/kernels/image/resize_bilinear_op.cc
...csrc/minddata/dataset/kernels/image/resize_bilinear_op.cc
+0
-1
mindspore/ccsrc/minddata/dataset/kernels/image/resize_bilinear_op.h
...ccsrc/minddata/dataset/kernels/image/resize_bilinear_op.h
+0
-4
mindspore/ccsrc/minddata/dataset/kernels/image/resize_op.h
mindspore/ccsrc/minddata/dataset/kernels/image/resize_op.h
+1
-1
mindspore/ccsrc/minddata/dataset/kernels/image/resize_with_bbox_op.h
...csrc/minddata/dataset/kernels/image/resize_with_bbox_op.h
+1
-1
mindspore/ccsrc/minddata/dataset/kernels/image/uniform_aug_op.h
...ore/ccsrc/minddata/dataset/kernels/image/uniform_aug_op.h
+1
-1
mindspore/ccsrc/minddata/dataset/kernels/no_op.h
mindspore/ccsrc/minddata/dataset/kernels/no_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/kernels/tensor_op.cc
mindspore/ccsrc/minddata/dataset/kernels/tensor_op.cc
+0
-2
mindspore/ccsrc/minddata/dataset/kernels/tensor_op.h
mindspore/ccsrc/minddata/dataset/kernels/tensor_op.h
+5
-2
mindspore/ccsrc/minddata/dataset/text/kernels/basic_tokenizer_op.h
.../ccsrc/minddata/dataset/text/kernels/basic_tokenizer_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/text/kernels/bert_tokenizer_op.h
...e/ccsrc/minddata/dataset/text/kernels/bert_tokenizer_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/text/kernels/case_fold_op.h
mindspore/ccsrc/minddata/dataset/text/kernels/case_fold_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/text/kernels/jieba_tokenizer_op.h
.../ccsrc/minddata/dataset/text/kernels/jieba_tokenizer_op.h
+1
-2
mindspore/ccsrc/minddata/dataset/text/kernels/normalize_utf8_op.h
...e/ccsrc/minddata/dataset/text/kernels/normalize_utf8_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/text/kernels/regex_replace_op.h
...re/ccsrc/minddata/dataset/text/kernels/regex_replace_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/text/kernels/regex_tokenizer_op.h
.../ccsrc/minddata/dataset/text/kernels/regex_tokenizer_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/text/kernels/sentence_piece_tokenizer_op.h
...nddata/dataset/text/kernels/sentence_piece_tokenizer_op.h
+1
-1
mindspore/ccsrc/minddata/dataset/text/kernels/sliding_window_op.h
...e/ccsrc/minddata/dataset/text/kernels/sliding_window_op.h
+0
-4
mindspore/ccsrc/minddata/dataset/text/kernels/truncate_sequence_pair_op.h
...minddata/dataset/text/kernels/truncate_sequence_pair_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/text/kernels/unicode_char_tokenizer_op.h
...minddata/dataset/text/kernels/unicode_char_tokenizer_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/text/kernels/unicode_script_tokenizer_op.h
...nddata/dataset/text/kernels/unicode_script_tokenizer_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/text/kernels/whitespace_tokenizer_op.h
...c/minddata/dataset/text/kernels/whitespace_tokenizer_op.h
+0
-2
mindspore/ccsrc/minddata/dataset/text/kernels/wordpiece_tokenizer_op.h
...rc/minddata/dataset/text/kernels/wordpiece_tokenizer_op.h
+0
-2
tests/ut/cpp/dataset/batch_op_test.cc
tests/ut/cpp/dataset/batch_op_test.cc
+4
-1
tests/ut/cpp/dataset/concatenate_op_test.cc
tests/ut/cpp/dataset/concatenate_op_test.cc
+0
-8
未找到文件。
mindspore/ccsrc/minddata/dataset/engine/datasetops/barrier_op.h
浏览文件 @
a3062640
...
...
@@ -121,6 +121,10 @@ class BarrierOp : public PipelineOp {
// @param show_all - if it should print everything
void
Print
(
std
::
ostream
&
out
,
bool
show_all
)
const
override
;
// Op name getter
// @return Name of the current Op
std
::
string
Name
()
const
override
{
return
kBarrierOp
;
}
// Provide stream operator for displaying it
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
BarrierOp
&
bo
)
{
bo
.
Print
(
out
,
false
);
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/batch_op.cc
浏览文件 @
a3062640
...
...
@@ -136,7 +136,7 @@ Status BatchOp::operator()() {
void
BatchOp
::
Print
(
std
::
ostream
&
out
,
bool
show_all
)
const
{
// Always show the id and name as first line regardless if this summary or detailed print
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
BatchOp
>:"
;
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
"
<<
Name
()
<<
"
>:"
;
if
(
!
show_all
)
{
// Call the super class for displaying any common 1-liner info
ParallelOp
::
Print
(
out
,
show_all
);
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/batch_op.h
浏览文件 @
a3062640
...
...
@@ -200,7 +200,7 @@ class BatchOp : public ParallelOp {
// Op name getter
// @return Name of the current Op
std
::
string
Name
()
const
override
{
return
"BatchOp"
;
}
std
::
string
Name
()
const
override
{
return
kBatchOp
;
}
// batch the rows in src table then put it to dest table
// @param const std::unique_ptr<TensorQTable> *src - table that has the rows for batching
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/bucket_batch_by_length_op.cc
浏览文件 @
a3062640
...
...
@@ -107,8 +107,6 @@ Status BucketBatchByLengthOp::EoeReceived(int32_t) {
return
Status
::
OK
();
}
void
BucketBatchByLengthOp
::
Print
(
std
::
ostream
&
out
,
bool
show_all
)
const
{
out
<<
"BucketBatchByLengthOp
\n
"
;
}
Status
BucketBatchByLengthOp
::
operator
()()
{
TaskManager
::
FindMe
()
->
Post
();
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/bucket_batch_by_length_op.h
浏览文件 @
a3062640
...
...
@@ -109,10 +109,7 @@ class BucketBatchByLengthOp : public PipelineOp {
// @return Status - The error code returned
Status
EoeReceived
(
int32_t
)
override
;
// A print method typically used for debugging
// @param out - The output stream to write output to
// @param show_all - A bool to control if you want to show all info or just a summary
void
Print
(
std
::
ostream
&
out
,
bool
show_all
)
const
override
;
std
::
string
Name
()
const
override
{
return
kBucketBatchByLengthOp
;
}
// << Stream output operator overload
// @notes This allows you to write the debug print info using stream operators
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/build_sentence_piece_vocab_op.h
浏览文件 @
a3062640
...
...
@@ -157,6 +157,8 @@ class BuildSentencePieceVocabOp : public PipelineOp {
Status
Reset
()
override
{
RETURN_STATUS_UNEXPECTED
(
"Reset shouldn't be called in BuildSentencePieceVocabOp"
);
}
std
::
string
Name
()
const
override
{
return
kBuildSentencePieceVocabOp
;
}
// build the input params for sentence api
std
::
unordered_map
<
std
::
string
,
std
::
string
>
BuildParams
();
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/build_vocab_op.cc
浏览文件 @
a3062640
...
...
@@ -208,7 +208,7 @@ BuildVocabOp::Builder::Builder()
// A print method typically used for debugging
void
BuildVocabOp
::
Print
(
std
::
ostream
&
out
,
bool
show_all
)
const
{
// Always show the id and name as first line regardless if this summary or detailed print
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
BuildVocabOp
>:"
;
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
"
<<
Name
()
<<
"
>:"
;
if
(
!
show_all
)
{
// Call the super class for displaying any common 1-liner info
ParallelOp
::
Print
(
out
,
show_all
);
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/build_vocab_op.h
浏览文件 @
a3062640
...
...
@@ -135,6 +135,7 @@ class BuildVocabOp : public ParallelOp {
/// \param[out] out The output stream to write output to
/// \param[in] show_all A bool to control if you want to show all info or just a summary
void
Print
(
std
::
ostream
&
out
,
bool
show_all
)
const
override
;
std
::
string
Name
()
const
override
{
return
kBuildVocabOp
;
}
/// \briefStream output operator overload
/// \notes This allows you to write the debug print info using stream operators
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_base_op.h
浏览文件 @
a3062640
...
...
@@ -59,6 +59,9 @@ class CacheBase : public ParallelOp {
/// \param show_all A bool to control if you want to show all info or just a summary
void
Print
(
std
::
ostream
&
out
,
bool
show_all
)
const
override
;
/// \brief Gives a name to the class, typically used for debugging
std
::
string
Name
()
const
override
{
return
kCacheBase
;
}
/// \brief << Stream output operator overload
/// \notes This allows you to write the debug print info using stream operators
/// \param out reference to the output stream being overloaded
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_lookup_op.h
浏览文件 @
a3062640
...
...
@@ -100,7 +100,7 @@ class CacheLookupOp : public CacheBase, public Sampler {
Status
GetNextSample
(
std
::
unique_ptr
<
DataBuffer
>
*
out_buffer
)
override
;
void
Print
(
std
::
ostream
&
out
,
bool
show_all
)
const
override
;
bool
AllowCacheMiss
()
override
{
return
true
;
}
std
::
string
Name
()
const
override
{
return
"CacheLookupOp"
;
}
std
::
string
Name
()
const
override
{
return
kCacheLookupOp
;
}
/// \brief Base-class override for NodePass visitor acceptor
/// \param[in] p The node to visit
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_merge_op.cc
浏览文件 @
a3062640
...
...
@@ -30,7 +30,7 @@ namespace dataset {
CacheMergeOp
::~
CacheMergeOp
()
=
default
;
void
CacheMergeOp
::
Print
(
std
::
ostream
&
out
,
bool
show_all
)
const
{
// Always show the id and name as first line regardless if this is summary or detailed print
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
CacheMergeOp
>:"
;
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
"
<<
Name
()
<<
"
>:"
;
if
(
!
show_all
)
{
// Call the super class for displaying any common 1-liner info
ParallelOp
::
Print
(
out
,
show_all
);
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_merge_op.h
浏览文件 @
a3062640
...
...
@@ -140,6 +140,8 @@ class CacheMergeOp : public ParallelOp {
std
::
shared_ptr
<
CacheClient
>
cache_client
,
const
std
::
shared_ptr
<
Sampler
>
&
sampler
);
~
CacheMergeOp
();
void
Print
(
std
::
ostream
&
out
,
bool
show_all
)
const
override
;
std
::
string
Name
()
const
override
{
return
kCacheMergeOp
;
}
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
CacheMergeOp
&
mo
)
{
mo
.
Print
(
out
,
false
);
return
out
;
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_op.h
浏览文件 @
a3062640
...
...
@@ -140,7 +140,7 @@ class CacheOp : public CacheBase, public RandomAccessOp {
/// \brief Base-class override for handling cases if we allow cache miss
bool
AllowCacheMiss
()
override
{
return
false
;
}
/// \brief Base-class override for the name of this operator
std
::
string
Name
()
const
override
{
return
"CacheOp"
;
}
std
::
string
Name
()
const
override
{
return
kCacheOp
;
}
/// \brief A public wrapper for creating the cache through the client
/// \param[in] cache_crc The crc that identifies the cache
/// \see cache_pass.cc
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/concat_op.cc
浏览文件 @
a3062640
...
...
@@ -43,7 +43,7 @@ ConcatOp::ConcatOp(int32_t op_connector_size) : PipelineOp(op_connector_size), c
// A function that prints info about the Operator
void
ConcatOp
::
Print
(
std
::
ostream
&
out
,
bool
show_all
)
const
{
// Always show the id and name as first line regardless if this is summary or detailed print
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
ConcatOp
>:"
;
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
"
<<
Name
()
<<
"
>:"
;
if
(
!
show_all
)
{
// Call the super class for displaying any common 1-liner info
PipelineOp
::
Print
(
out
,
show_all
);
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/concat_op.h
浏览文件 @
a3062640
...
...
@@ -77,7 +77,7 @@ class ConcatOp : public PipelineOp {
// Op name getter
// @return Name of the current Op
std
::
string
Name
()
const
override
{
return
"ConcatOp"
;
}
std
::
string
Name
()
const
override
{
return
kConcatOp
;
}
// Private function for computing the assignment of the column name map.
// @return - Status
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/dataset_op.cc
浏览文件 @
a3062640
...
...
@@ -239,6 +239,8 @@ void DatasetOp::Print(std::ostream &out, bool show_all) const {
if
(
sampler_
)
{
sampler_
->
Print
(
out
,
show_all
);
}
}
else
{
out
<<
Name
()
<<
std
::
endl
;
}
}
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/dataset_op.h
浏览文件 @
a3062640
...
...
@@ -28,6 +28,31 @@
namespace
mindspore
{
namespace
dataset
{
constexpr
char
kBarrierOp
[]
=
"BarrierOp"
;
constexpr
char
kBatchOp
[]
=
"BatchOp"
;
constexpr
char
kBucketBatchByLengthOp
[]
=
"BucketBatchByLengthOp"
;
constexpr
char
kBuildSentencePieceVocabOp
[]
=
"BuildSentencePieceVocabOp"
;
constexpr
char
kBuildVocabOp
[]
=
"BuildVocabOp"
;
constexpr
char
kCacheBase
[]
=
"CacheBase"
;
constexpr
char
kCacheLookupOp
[]
=
"CacheLookupOp"
;
constexpr
char
kCacheMergeOp
[]
=
"CacheMergeOp"
;
constexpr
char
kCacheOp
[]
=
"CacheOp"
;
constexpr
char
kConcatOp
[]
=
"ConcatOp"
;
constexpr
char
kDatasetOp
[]
=
"DatasetOp"
;
constexpr
char
kDeviceQueueOp
[]
=
"DeviceQueueOp"
;
constexpr
char
kEpochCtrlOp
[]
=
"EpochCtrlOp"
;
constexpr
char
kFilterOp
[]
=
"FilterOp"
;
constexpr
char
kMapOp
[]
=
"MapOp"
;
constexpr
char
kParallelOp
[]
=
"ParallelOp"
;
constexpr
char
kPipelineOp
[]
=
"PipelineOp"
;
constexpr
char
kProjectOp
[]
=
"ProjectOp"
;
constexpr
char
kRenameOp
[]
=
"RenameOp"
;
constexpr
char
kRepeatOp
[]
=
"RepeatOp"
;
constexpr
char
kShuffleOp
[]
=
"ShuffleOp"
;
constexpr
char
kSkipOp
[]
=
"SkipOp"
;
constexpr
char
kTakeOp
[]
=
"TakeOp"
;
constexpr
char
kZipOp
[]
=
"ZipOp"
;
// Forward declare
class
ExecutionTree
;
...
...
@@ -292,7 +317,7 @@ class DatasetOp : public std::enable_shared_from_this<DatasetOp> {
/// Op name getter
/// \return Name of the current Op
virtual
std
::
string
Name
()
const
{
return
"DatasetOp"
;
}
virtual
std
::
string
Name
()
const
=
0
;
/// Execution Tree getter
/// \return Pointer to the ExecutionTree the current op belongs to, no ownership
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/device_queue_op.cc
浏览文件 @
a3062640
...
...
@@ -307,7 +307,7 @@ Status DeviceQueueOp::SendDataToCPU() {
void
DeviceQueueOp
::
Print
(
std
::
ostream
&
out
,
bool
show_all
)
const
{
// Always show the id and name as first line regardless if this summary or detailed print
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
DeviceQueueOp
>:"
;
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
"
<<
Name
()
<<
"
>:"
;
if
(
!
show_all
)
{
// Call the super class for displaying any common 1-liner info
PipelineOp
::
Print
(
out
,
show_all
);
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/device_queue_op.h
浏览文件 @
a3062640
...
...
@@ -146,7 +146,7 @@ class DeviceQueueOp : public PipelineOp {
// Op name getter
// @return Name of the current Op
std
::
string
Name
()
const
override
{
return
"DeviceQueueOp"
;
}
std
::
string
Name
()
const
override
{
return
kDeviceQueueOp
;
}
private:
// Name: checkExceptions(DataBuffer);
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/epoch_ctrl_op.cc
浏览文件 @
a3062640
...
...
@@ -43,7 +43,7 @@ EpochCtrlOp::~EpochCtrlOp() {}
// A print method typically used for debugging
void
EpochCtrlOp
::
Print
(
std
::
ostream
&
out
,
bool
show_all
)
const
{
// Always show the id and name as first line regardless if this summary or detailed print
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
EpochCtrlOp
>:"
;
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
"
<<
Name
()
<<
"
>:"
;
if
(
!
show_all
)
{
// Call the super class for displaying any common 1-liner info
PipelineOp
::
Print
(
out
,
show_all
);
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/epoch_ctrl_op.h
浏览文件 @
a3062640
...
...
@@ -52,6 +52,7 @@ class EpochCtrlOp : public RepeatOp {
// @param out - The output stream to write output to
// @param show_all - A bool to control if you want to show all info or just a summary
void
Print
(
std
::
ostream
&
out
,
bool
show_all
)
const
override
;
std
::
string
Name
()
const
override
{
return
kEpochCtrlOp
;
}
// This function returns the buffer that is at the top of our output connector. The caller is
// typically our parent node, when the parent is asking us to provide the next buffer of data.
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/filter_op.cc
浏览文件 @
a3062640
...
...
@@ -91,7 +91,7 @@ Status FilterOp::ValidateInColumns(const std::vector<std::string> *input_columns
// A print method typically used for debugging.
void
FilterOp
::
Print
(
std
::
ostream
&
out
,
bool
show_all
)
const
{
// Always show the id and name as first line regardless if this summary or detailed print
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
FilterOp
>:"
;
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
"
<<
Name
()
<<
"
>:"
;
if
(
!
show_all
)
{
// Call the super class for displaying any common 1-liner info
ParallelOp
::
Print
(
out
,
show_all
);
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/filter_op.h
浏览文件 @
a3062640
...
...
@@ -129,7 +129,7 @@ class FilterOp : public ParallelOp {
// Op name getter
// @return Name of the current Op
std
::
string
Name
()
const
override
{
return
"FilterOp"
;
}
std
::
string
Name
()
const
override
{
return
kFilterOp
;
}
private:
// predicate_func python callable which returns a boolean value.
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/map_op.cc
浏览文件 @
a3062640
...
...
@@ -84,7 +84,7 @@ int32_t MapOp::num_consumers() const {
// A print method typically used for debugging
void
MapOp
::
Print
(
std
::
ostream
&
out
,
bool
show_all
)
const
{
// Always show the id and name as first line regardless if this summary or detailed print
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
MapOp
>:"
;
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
"
<<
Name
()
<<
"
>:"
;
if
(
!
show_all
)
{
// Call the super class for displaying any common 1-liner info
ParallelOp
::
Print
(
out
,
show_all
);
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/map_op.h
浏览文件 @
a3062640
...
...
@@ -179,7 +179,7 @@ class MapOp : public ParallelOp {
// Op name getter
// @return Name of the current Op
std
::
string
Name
()
const
override
{
return
"MapOp"
;
}
std
::
string
Name
()
const
override
{
return
kMapOp
;
}
// List of tensor ops getter/setter
// @Return the vector of tensor ops by non-const reference
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/parallel_op.h
浏览文件 @
a3062640
...
...
@@ -17,6 +17,7 @@
#define MINDSPORE_CCSRC_MINDDATA_DATASET_ENGINE_DATASETOPS_PARALLEL_OP_H_
#include <memory>
#include <string>
#include <vector>
#include "minddata/dataset/core/constants.h"
#include "minddata/dataset/engine/datasetops/dataset_op.h"
...
...
@@ -54,6 +55,7 @@ class ParallelOp : public DatasetOp {
// @param out - The output stream to write output to
// @param show_all - A bool to control if you want to show all info or just a summary
void
Print
(
std
::
ostream
&
out
,
bool
show_all
)
const
override
;
std
::
string
Name
()
const
override
{
return
kParallelOp
;
}
// << Stream output operator overload
// @notes This allows you to write the debug print info using stream operators
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/pipeline_op.h
浏览文件 @
a3062640
...
...
@@ -17,6 +17,7 @@
#define MINDSPORE_CCSRC_MINDDATA_DATASET_ENGINE_DATASETOPS_PIPELINE_OP_H_
#include <memory>
#include <string>
#include <vector>
#include "minddata/dataset/engine/datasetops/dataset_op.h"
...
...
@@ -42,6 +43,7 @@ class PipelineOp : public DatasetOp {
// @param out - The output stream to write output to
// @param show_all - A bool to control if you want to show all info or just a summary
void
Print
(
std
::
ostream
&
out
,
bool
show_all
)
const
override
;
std
::
string
Name
()
const
override
{
return
kPipelineOp
;
}
// << Stream output operator overload
// @notes This allows you to write the debug print info using stream operators
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/project_op.cc
浏览文件 @
a3062640
...
...
@@ -52,7 +52,7 @@ ProjectOp::ProjectOp(const std::vector<std::string> &columns_to_project)
void
ProjectOp
::
Print
(
std
::
ostream
&
out
,
bool
show_all
)
const
{
// Always show the id and name as first line regardless if this summary or detailed print
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
ProjectOp
>:"
;
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
"
<<
Name
()
<<
"
>:"
;
if
(
!
show_all
)
{
// Call the super class for displaying any common 1-liner info
PipelineOp
::
Print
(
out
,
show_all
);
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/project_op.h
浏览文件 @
a3062640
...
...
@@ -109,7 +109,7 @@ class ProjectOp : public PipelineOp {
// Op name getter
// @return Name of the current Op
std
::
string
Name
()
const
override
{
return
"ProjectOp"
;
}
std
::
string
Name
()
const
override
{
return
kProjectOp
;
}
private:
std
::
vector
<
std
::
string
>
columns_to_project_
;
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/rename_op.cc
浏览文件 @
a3062640
...
...
@@ -142,7 +142,7 @@ Status RenameOp::ComputeColMap() {
void
RenameOp
::
Print
(
std
::
ostream
&
out
,
// In: The output stream to print to
bool
show_all
)
const
{
// In: T/F if it should print everything
// Always show the id and name as first line regardless if this summary or detailed print
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
RenameOp
>:"
;
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
"
<<
Name
()
<<
"
>:"
;
if
(
!
show_all
)
{
// Call the super class for displaying any common 1-liner info
PipelineOp
::
Print
(
out
,
show_all
);
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/rename_op.h
浏览文件 @
a3062640
...
...
@@ -118,7 +118,7 @@ class RenameOp : public PipelineOp {
// Op name getter
// @return Name of the current Op
std
::
string
Name
()
const
override
{
return
"RenameOp"
;
}
std
::
string
Name
()
const
override
{
return
kRenameOp
;
}
protected:
// Rename core functionality
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/repeat_op.cc
浏览文件 @
a3062640
...
...
@@ -54,7 +54,7 @@ RepeatOp::~RepeatOp() {}
// A print method typically used for debugging
void
RepeatOp
::
Print
(
std
::
ostream
&
out
,
bool
show_all
)
const
{
// Always show the id and name as first line regardless if this summary or detailed print
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
RepeatOp
>:"
;
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
"
<<
Name
()
<<
"
>:"
;
if
(
!
show_all
)
{
// Call the super class for displaying any common 1-liner info
PipelineOp
::
Print
(
out
,
show_all
);
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/repeat_op.h
浏览文件 @
a3062640
...
...
@@ -129,7 +129,7 @@ class RepeatOp : public PipelineOp {
// Op name getter
// @return Name of the current Op
std
::
string
Name
()
const
override
{
return
"RepeatOp"
;
}
std
::
string
Name
()
const
override
{
return
kRepeatOp
;
}
// \brief Adds an operator to the repeat ops list of tracked leaf/eoe nodes
// \param[in] eoe_op The input leaf/eoe operator to add to the list
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/shuffle_op.cc
浏览文件 @
a3062640
...
...
@@ -101,7 +101,7 @@ Status ShuffleOp::SelfReset() {
// A print method typically used for debugging
void
ShuffleOp
::
Print
(
std
::
ostream
&
out
,
bool
show_all
)
const
{
// Always show the id and name as first line regardless if this summary or detailed print
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
ShuffleOp
>:"
;
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
"
<<
Name
()
<<
"
>:"
;
if
(
!
show_all
)
{
// Call the super class for displaying any common 1-liner info
PipelineOp
::
Print
(
out
,
show_all
);
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/shuffle_op.h
浏览文件 @
a3062640
...
...
@@ -163,7 +163,7 @@ class ShuffleOp : public PipelineOp {
// Op name getter
// @return Name of the current Op
std
::
string
Name
()
const
override
{
return
"ShuffleOp"
;
}
std
::
string
Name
()
const
override
{
return
kShuffleOp
;
}
private:
// Private function to add a new row to the shuffle buffer.
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/skip_op.cc
浏览文件 @
a3062640
...
...
@@ -59,7 +59,7 @@ SkipOp::~SkipOp() {}
// A print method typically used for debugging
void
SkipOp
::
Print
(
std
::
ostream
&
out
,
bool
show_all
)
const
{
// Always show the id and name as first line regardless if this summary or detailed print
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
SkipOp
>:"
;
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
"
<<
Name
()
<<
"
>:"
;
if
(
!
show_all
)
{
// Call the super class for displaying any common 1-liner info
PipelineOp
::
Print
(
out
,
show_all
);
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/skip_op.h
浏览文件 @
a3062640
...
...
@@ -82,7 +82,7 @@ class SkipOp : public PipelineOp {
// Op name getter
// @return Name of the current Op
std
::
string
Name
()
const
override
{
return
"SkipOp"
;
}
std
::
string
Name
()
const
override
{
return
kSkipOp
;
}
private:
int32_t
max_skips_
;
// The number of skips that the user requested
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/take_op.cc
浏览文件 @
a3062640
...
...
@@ -54,7 +54,7 @@ TakeOp::TakeOp(int32_t count, int32_t op_connector_size)
// A print method typically used for debugging
void
TakeOp
::
Print
(
std
::
ostream
&
out
,
bool
show_all
)
const
{
// Always show the id and name as first line regardless if this summary or detailed print
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
TakeOp
>:"
;
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
"
<<
Name
()
<<
"
>:"
;
if
(
!
show_all
)
{
// Call the super class for displaying any common 1-liner info
PipelineOp
::
Print
(
out
,
show_all
);
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/take_op.h
浏览文件 @
a3062640
...
...
@@ -86,7 +86,7 @@ class TakeOp : public PipelineOp {
// Op name getter
// @return Name of the current Op
std
::
string
Name
()
const
override
{
return
"TakeOp"
;
}
std
::
string
Name
()
const
override
{
return
kTakeOp
;
}
private:
int32_t
max_takes_
;
// The number of takes that the user requested
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/zip_op.cc
浏览文件 @
a3062640
...
...
@@ -209,7 +209,7 @@ Status ZipOp::drainPipeline() {
void
ZipOp
::
Print
(
std
::
ostream
&
out
,
// In: The output stream to print to
bool
show_all
)
const
{
// In: T/F if it should print everything
// Always show the id and name as first line regardless if this is summary or detailed print
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
ZipOp
>:"
;
out
<<
"("
<<
std
::
setw
(
2
)
<<
operator_id_
<<
") <
"
<<
Name
()
<<
"
>:"
;
if
(
!
show_all
)
{
// Call the super class for displaying any common 1-liner info
PipelineOp
::
Print
(
out
,
show_all
);
...
...
mindspore/ccsrc/minddata/dataset/engine/datasetops/zip_op.h
浏览文件 @
a3062640
...
...
@@ -112,7 +112,7 @@ class ZipOp : public PipelineOp {
// Op name getter
// @return Name of the current Op
std
::
string
Name
()
const
override
{
return
"ZipOp"
;
}
std
::
string
Name
()
const
override
{
return
kZipOp
;
}
private:
// Handles preprocessing of the main loop, used when starting new epoch
...
...
mindspore/ccsrc/minddata/dataset/kernels/data/concatenate_op.h
浏览文件 @
a3062640
...
...
@@ -40,7 +40,6 @@ class ConcatenateOp : public TensorOp {
/// Print method to see which tensor Op this is.
/// @param std::ostream &out - output stream object.
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"ConcatenateOp"
;
}
/// Compute method allowing multiple tensors as inputs
/// @param TensorRow &input - input tensor rows
...
...
mindspore/ccsrc/minddata/dataset/kernels/data/duplicate_op.h
浏览文件 @
a3062640
...
...
@@ -32,8 +32,6 @@ class DuplicateOp : public TensorOp {
~
DuplicateOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"DuplicateOp"
;
}
Status
Compute
(
const
TensorRow
&
input
,
TensorRow
*
output
)
override
;
uint32_t
NumOutput
()
override
{
return
2
;
}
...
...
mindspore/ccsrc/minddata/dataset/kernels/data/fill_op.h
浏览文件 @
a3062640
...
...
@@ -31,7 +31,6 @@ class FillOp : public TensorOp {
explicit
FillOp
(
std
::
shared_ptr
<
Tensor
>
value
)
:
fill_value_
(
value
)
{}
~
FillOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"FillOp"
;
}
Status
Compute
(
const
std
::
shared_ptr
<
Tensor
>
&
input
,
std
::
shared_ptr
<
Tensor
>
*
output
)
override
;
...
...
mindspore/ccsrc/minddata/dataset/kernels/data/mask_op.h
浏览文件 @
a3062640
...
...
@@ -37,8 +37,6 @@ class MaskOp : public TensorOp {
~
MaskOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"MaskOp"
;
}
Status
Compute
(
const
std
::
shared_ptr
<
Tensor
>
&
input
,
std
::
shared_ptr
<
Tensor
>
*
output
)
override
;
Status
OutputType
(
const
std
::
vector
<
DataType
>
&
inputs
,
std
::
vector
<
DataType
>
&
outputs
)
override
;
...
...
mindspore/ccsrc/minddata/dataset/kernels/data/one_hot_op.h
浏览文件 @
a3062640
...
...
@@ -31,8 +31,6 @@ class OneHotOp : public TensorOp {
~
OneHotOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"OneHotOp"
;
}
Status
Compute
(
const
std
::
shared_ptr
<
Tensor
>
&
input
,
std
::
shared_ptr
<
Tensor
>
*
output
)
override
;
Status
OutputShape
(
const
std
::
vector
<
TensorShape
>
&
inputs
,
std
::
vector
<
TensorShape
>
&
outputs
)
override
;
...
...
mindspore/ccsrc/minddata/dataset/kernels/data/pad_end_op.h
浏览文件 @
a3062640
...
...
@@ -32,8 +32,6 @@ class PadEndOp : public TensorOp {
~
PadEndOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"PadEndOp"
;
}
Status
Compute
(
const
std
::
shared_ptr
<
Tensor
>
&
input
,
std
::
shared_ptr
<
Tensor
>
*
output
)
override
;
Status
OutputShape
(
const
std
::
vector
<
TensorShape
>
&
inputs
,
std
::
vector
<
TensorShape
>
&
outputs
)
override
;
...
...
mindspore/ccsrc/minddata/dataset/kernels/data/slice_op.h
浏览文件 @
a3062640
...
...
@@ -67,8 +67,6 @@ class SliceOp : public TensorOp {
~
SliceOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"SliceOp"
;
}
Status
Compute
(
const
std
::
shared_ptr
<
Tensor
>
&
input
,
std
::
shared_ptr
<
Tensor
>
*
output
)
override
;
std
::
string
Name
()
const
override
{
return
kSliceOp
;
}
...
...
mindspore/ccsrc/minddata/dataset/kernels/data/to_float16_op.h
浏览文件 @
a3062640
...
...
@@ -39,8 +39,6 @@ class ToFloat16Op : public TensorOp {
// @return Status - The error code return
Status
Compute
(
const
std
::
shared_ptr
<
Tensor
>
&
input
,
std
::
shared_ptr
<
Tensor
>
*
output
)
override
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"ToFloat16Op"
;
}
Status
OutputType
(
const
std
::
vector
<
DataType
>
&
inputs
,
std
::
vector
<
DataType
>
&
outputs
)
override
;
std
::
string
Name
()
const
override
{
return
kToFloat16Op
;
}
...
...
mindspore/ccsrc/minddata/dataset/kernels/data/type_cast_op.h
浏览文件 @
a3062640
...
...
@@ -39,7 +39,6 @@ class TypeCastOp : public TensorOp {
Status
Compute
(
const
std
::
shared_ptr
<
Tensor
>
&
input
,
std
::
shared_ptr
<
Tensor
>
*
output
)
override
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"TypeCastOp"
;
}
Status
OutputType
(
const
std
::
vector
<
DataType
>
&
inputs
,
std
::
vector
<
DataType
>
&
outputs
)
override
;
std
::
string
Name
()
const
override
{
return
kTypeCastOp
;
}
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/auto_contrast_op.h
浏览文件 @
a3062640
...
...
@@ -45,8 +45,6 @@ class AutoContrastOp : public TensorOp {
return
out
;
}
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
Name
();
}
std
::
string
Name
()
const
override
{
return
kAutoContrastOp
;
}
Status
Compute
(
const
std
::
shared_ptr
<
Tensor
>
&
input
,
std
::
shared_ptr
<
Tensor
>
*
output
)
override
;
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/bounding_box_augment_op.h
浏览文件 @
a3062640
...
...
@@ -47,8 +47,6 @@ class BoundingBoxAugmentOp : public TensorOp {
return
out
;
}
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"BoundingBoxAugmentOp"
;
}
Status
Compute
(
const
TensorRow
&
input
,
TensorRow
*
output
)
override
;
std
::
string
Name
()
const
override
{
return
kBoundingBoxAugmentOp
;
}
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/decode_op.h
浏览文件 @
a3062640
...
...
@@ -37,7 +37,6 @@ class DecodeOp : public TensorOp {
Status
Compute
(
const
std
::
shared_ptr
<
Tensor
>
&
input
,
std
::
shared_ptr
<
Tensor
>
*
output
)
override
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"DecodeOp"
;
}
Status
OutputShape
(
const
std
::
vector
<
TensorShape
>
&
inputs
,
std
::
vector
<
TensorShape
>
&
outputs
)
override
;
Status
OutputType
(
const
std
::
vector
<
DataType
>
&
inputs
,
std
::
vector
<
DataType
>
&
outputs
)
override
;
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/equalize_op.h
浏览文件 @
a3062640
...
...
@@ -32,9 +32,6 @@ class EqualizeOp : public TensorOp {
EqualizeOp
()
{}
~
EqualizeOp
()
=
default
;
// Description: A function that prints info about the node
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
Name
();
}
Status
Compute
(
const
std
::
shared_ptr
<
Tensor
>
&
input
,
std
::
shared_ptr
<
Tensor
>
*
output
)
override
;
std
::
string
Name
()
const
override
{
return
kEqualizeOp
;
}
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/hwc_to_chw_op.h
浏览文件 @
a3062640
...
...
@@ -28,8 +28,6 @@ namespace mindspore {
namespace
dataset
{
class
HwcToChwOp
:
public
TensorOp
{
public:
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"HwcToChw"
;
}
Status
Compute
(
const
std
::
shared_ptr
<
Tensor
>
&
input
,
std
::
shared_ptr
<
Tensor
>
*
output
)
override
;
Status
OutputShape
(
const
std
::
vector
<
TensorShape
>
&
inputs
,
std
::
vector
<
TensorShape
>
&
outputs
)
override
;
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/invert_op.h
浏览文件 @
a3062640
...
...
@@ -31,9 +31,6 @@ class InvertOp : public TensorOp {
InvertOp
()
{}
~
InvertOp
()
=
default
;
// Description: A function that prints info about the node
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
Name
();
}
Status
Compute
(
const
std
::
shared_ptr
<
Tensor
>
&
input
,
std
::
shared_ptr
<
Tensor
>
*
output
)
override
;
std
::
string
Name
()
const
override
{
return
kInvertOp
;
}
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/pad_op.h
浏览文件 @
a3062640
...
...
@@ -49,8 +49,6 @@ class PadOp : public TensorOp {
~
PadOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"PadOp: "
;
}
Status
Compute
(
const
std
::
shared_ptr
<
Tensor
>
&
input
,
std
::
shared_ptr
<
Tensor
>
*
output
)
override
;
Status
OutputShape
(
const
std
::
vector
<
TensorShape
>
&
inputs
,
std
::
vector
<
TensorShape
>
&
outputs
)
override
;
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/random_color_adjust_op.h
浏览文件 @
a3062640
...
...
@@ -47,10 +47,6 @@ class RandomColorAdjustOp : public TensorOp {
~
RandomColorAdjustOp
()
override
=
default
;
// Print function for RandomJitter.
// @param out output stream to print to.
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"RandomColorAdjustOp: "
;
}
// Overrides the base class compute function.
// Calls multiple transform functions in ImageUtils, this function takes an input tensor.
// and transforms its data using openCV, the output memory is manipulated to contain the result.
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/random_crop_decode_resize_op.h
浏览文件 @
a3062640
...
...
@@ -40,8 +40,7 @@ class RandomCropDecodeResizeOp : public RandomCropAndResizeOp {
~
RandomCropDecodeResizeOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"RandomCropDecodeResize: "
<<
RandomCropAndResizeOp
::
target_height_
<<
" "
<<
RandomCropAndResizeOp
::
target_width_
;
out
<<
Name
()
<<
": "
<<
RandomCropAndResizeOp
::
target_height_
<<
" "
<<
RandomCropAndResizeOp
::
target_width_
;
}
Status
Compute
(
const
std
::
shared_ptr
<
Tensor
>
&
input
,
std
::
shared_ptr
<
Tensor
>
*
output
)
override
;
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/random_crop_op.h
浏览文件 @
a3062640
...
...
@@ -52,7 +52,7 @@ class RandomCropOp : public TensorOp {
~
RandomCropOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"RandomCropOp
: "
<<
crop_height_
<<
" "
<<
crop_width_
;
}
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
Name
()
<<
"
: "
<<
crop_height_
<<
" "
<<
crop_width_
;
}
Status
Compute
(
const
std
::
shared_ptr
<
Tensor
>
&
input
,
std
::
shared_ptr
<
Tensor
>
*
output
)
override
;
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/random_crop_with_bbox_op.h
浏览文件 @
a3062640
...
...
@@ -38,7 +38,7 @@ class RandomCropWithBBoxOp : public RandomCropOp {
~
RandomCropWithBBoxOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"RandomCropWithBBoxOp
: "
<<
RandomCropOp
::
crop_height_
<<
" "
<<
RandomCropOp
::
crop_width_
;
out
<<
Name
()
<<
"
: "
<<
RandomCropOp
::
crop_height_
<<
" "
<<
RandomCropOp
::
crop_width_
;
}
Status
Compute
(
const
TensorRow
&
input
,
TensorRow
*
output
)
override
;
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/random_horizontal_flip_op.h
浏览文件 @
a3062640
...
...
@@ -44,8 +44,6 @@ class RandomHorizontalFlipOp : public TensorOp {
return
out
;
}
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"RandomHorizontalFlipOp"
;
}
Status
Compute
(
const
std
::
shared_ptr
<
Tensor
>
&
input
,
std
::
shared_ptr
<
Tensor
>
*
output
)
override
;
std
::
string
Name
()
const
override
{
return
kRandomHorizontalFlipOp
;
}
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/random_horizontal_flip_with_bbox_op.h
浏览文件 @
a3062640
...
...
@@ -45,8 +45,6 @@ class RandomHorizontalFlipWithBBoxOp : public TensorOp {
return
out
;
}
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"RandomHorizontalFlipWithBBoxOp"
;
}
Status
Compute
(
const
TensorRow
&
input
,
TensorRow
*
output
)
override
;
std
::
string
Name
()
const
override
{
return
kRandomHorizontalFlipWithBBoxOp
;
}
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/random_resize_op.h
浏览文件 @
a3062640
...
...
@@ -40,9 +40,7 @@ class RandomResizeOp : public ResizeOp {
~
RandomResizeOp
()
=
default
;
// Description: A function that prints info about the node
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"RandomResizeOp: "
<<
ResizeOp
::
size1_
<<
" "
<<
ResizeOp
::
size2_
;
}
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
Name
()
<<
": "
<<
ResizeOp
::
size1_
<<
" "
<<
ResizeOp
::
size2_
;
}
Status
Compute
(
const
std
::
shared_ptr
<
Tensor
>
&
input
,
std
::
shared_ptr
<
Tensor
>
*
output
)
override
;
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/random_resize_with_bbox_op.h
浏览文件 @
a3062640
...
...
@@ -42,7 +42,7 @@ class RandomResizeWithBBoxOp : public ResizeWithBBoxOp {
// Description: A function that prints info about the node
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"RandomResizeWithBBoxOp
: "
<<
ResizeWithBBoxOp
::
size1_
<<
" "
<<
ResizeWithBBoxOp
::
size2_
;
out
<<
Name
()
<<
"
: "
<<
ResizeWithBBoxOp
::
size1_
<<
" "
<<
ResizeWithBBoxOp
::
size2_
;
}
Status
Compute
(
const
TensorRow
&
input
,
TensorRow
*
output
)
override
;
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/random_rotation_op.h
浏览文件 @
a3062640
...
...
@@ -58,10 +58,6 @@ class RandomRotationOp : public TensorOp {
~
RandomRotationOp
()
override
=
default
;
// Print function for RandomRotation
// @param out output stream to print to
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"RandomRotationOp: "
;
}
// Overrides the base class compute function
// Calls the rotate function in ImageUtils, this function takes an input tensor
// and transforms its data using openCV, the output memory is manipulated to contain the result
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/random_vertical_flip_op.h
浏览文件 @
a3062640
...
...
@@ -38,8 +38,6 @@ class RandomVerticalFlipOp : public TensorOp {
~
RandomVerticalFlipOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"RandomVerticalFlipOp"
;
}
Status
Compute
(
const
std
::
shared_ptr
<
Tensor
>
&
input
,
std
::
shared_ptr
<
Tensor
>
*
output
)
override
;
std
::
string
Name
()
const
override
{
return
kRandomVerticalFlipOp
;
}
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/random_vertical_flip_with_bbox_op.h
浏览文件 @
a3062640
...
...
@@ -39,8 +39,6 @@ class RandomVerticalFlipWithBBoxOp : public TensorOp {
~
RandomVerticalFlipWithBBoxOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"RandomVerticalFlipWithBBoxOp"
;
}
Status
Compute
(
const
TensorRow
&
input
,
TensorRow
*
output
)
override
;
std
::
string
Name
()
const
override
{
return
kRandomVerticalFlipWithBBoxOp
;
}
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/rescale_op.h
浏览文件 @
a3062640
...
...
@@ -33,7 +33,7 @@ class RescaleOp : public TensorOp {
~
RescaleOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"RescaleOp
: shift: "
<<
shift_
<<
", Rescale: "
<<
rescale_
<<
std
::
endl
;
out
<<
Name
()
<<
"
: shift: "
<<
shift_
<<
", Rescale: "
<<
rescale_
<<
std
::
endl
;
}
Status
Compute
(
const
std
::
shared_ptr
<
Tensor
>
&
input
,
std
::
shared_ptr
<
Tensor
>
*
output
)
override
;
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/resize_bilinear_op.cc
浏览文件 @
a3062640
...
...
@@ -22,6 +22,5 @@ namespace mindspore {
namespace
dataset
{
const
int32_t
ResizeBilinearOp
::
kDefWidth
=
0
;
void
ResizeBilinearOp
::
Print
(
std
::
ostream
&
out
)
const
{
out
<<
"ResizeBilinearOp: "
;
}
}
// namespace dataset
}
// namespace mindspore
mindspore/ccsrc/minddata/dataset/kernels/image/resize_bilinear_op.h
浏览文件 @
a3062640
...
...
@@ -48,10 +48,6 @@ class ResizeBilinearOp : public ResizeOp {
// Description: Destructor
~
ResizeBilinearOp
()
=
default
;
// Name: Print()
// Description: A function that prints info about the node
void
Print
(
std
::
ostream
&
out
)
const
override
;
std
::
string
Name
()
const
override
{
return
kResizeBilinearOp
;
}
};
}
// namespace dataset
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/resize_op.h
浏览文件 @
a3062640
...
...
@@ -50,7 +50,7 @@ class ResizeOp : public TensorOp {
~
ResizeOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"ResizeOp
: "
<<
size1_
<<
" "
<<
size2_
;
}
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
Name
()
<<
"
: "
<<
size1_
<<
" "
<<
size2_
;
}
Status
Compute
(
const
std
::
shared_ptr
<
Tensor
>
&
input
,
std
::
shared_ptr
<
Tensor
>
*
output
)
override
;
Status
OutputShape
(
const
std
::
vector
<
TensorShape
>
&
inputs
,
std
::
vector
<
TensorShape
>
&
outputs
)
override
;
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/resize_with_bbox_op.h
浏览文件 @
a3062640
...
...
@@ -34,7 +34,7 @@ class ResizeWithBBoxOp : public ResizeOp {
~
ResizeWithBBoxOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"ResizeWithBBoxOp
: "
<<
size1_
<<
" "
<<
size2_
;
}
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
Name
()
<<
"
: "
<<
size1_
<<
" "
<<
size2_
;
}
Status
Compute
(
const
TensorRow
&
input
,
TensorRow
*
output
)
override
;
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/uniform_aug_op.h
浏览文件 @
a3062640
...
...
@@ -40,7 +40,7 @@ class UniformAugOp : public TensorOp {
// Destructor
~
UniformAugOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"UniformAugOp
:: number of ops "
<<
num_ops_
;
}
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
Name
()
<<
"
:: number of ops "
<<
num_ops_
;
}
// Overrides the base class compute function
// @return Status - The error code return
...
...
mindspore/ccsrc/minddata/dataset/kernels/no_op.h
浏览文件 @
a3062640
...
...
@@ -31,8 +31,6 @@ class NoOp : public TensorOp {
return
Status
::
OK
();
}
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"NoOp"
;
};
std
::
string
Name
()
const
override
{
return
kNoOp
;
}
};
}
// namespace dataset
...
...
mindspore/ccsrc/minddata/dataset/kernels/tensor_op.cc
浏览文件 @
a3062640
...
...
@@ -48,8 +48,6 @@ Status TensorOp::Compute(const TensorRow &input, TensorRow *output) {
"Is this TensorOp oneToOne? If no, please implement this Compute() in the derived class."
);
}
void
TensorOp
::
Print
(
std
::
ostream
&
out
)
const
{
out
<<
"TensorOp"
<<
std
::
endl
;
}
Status
TensorOp
::
OutputShape
(
const
std
::
vector
<
TensorShape
>
&
inputs
,
std
::
vector
<
TensorShape
>
&
outputs
)
{
if
(
inputs
.
size
()
!=
NumInput
())
return
Status
(
StatusCode
::
kUnexpectedError
,
...
...
mindspore/ccsrc/minddata/dataset/kernels/tensor_op.h
浏览文件 @
a3062640
...
...
@@ -86,6 +86,9 @@
namespace
mindspore
{
namespace
dataset
{
// base class
constexpr
char
kTensorOp
[]
=
"TensorOp"
;
// image
constexpr
char
kAutoContrastOp
[]
=
"AutoContrastOp"
;
constexpr
char
kBoundingBoxAugmentOp
[]
=
"BoundingBoxAugmentOp"
;
...
...
@@ -140,7 +143,7 @@ constexpr char kRandomSelectSubpolicyOp[] = "RandomSelectSubpolicyOp";
constexpr
char
kSentencepieceTokenizerOp
[]
=
"SentencepieceTokenizerOp"
;
// data
constexpr
char
kConcatenateOp
[]
=
"
k
ConcatenateOp"
;
constexpr
char
kConcatenateOp
[]
=
"ConcatenateOp"
;
constexpr
char
kDuplicateOp
[]
=
"DuplicateOp"
;
constexpr
char
kFillOp
[]
=
"FillOp"
;
constexpr
char
kMaskOp
[]
=
"MaskOp"
;
...
...
@@ -163,7 +166,7 @@ class TensorOp {
// A function that prints info about the tensor operation
// @param out
virtual
void
Print
(
std
::
ostream
&
out
)
const
;
virtual
void
Print
(
std
::
ostream
&
out
)
const
{
out
<<
Name
()
<<
std
::
endl
;
}
// Provide stream operator for displaying it
// @param output stream
...
...
mindspore/ccsrc/minddata/dataset/text/kernels/basic_tokenizer_op.h
浏览文件 @
a3062640
...
...
@@ -45,8 +45,6 @@ class BasicTokenizerOp : public TensorOp {
~
BasicTokenizerOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"BasicTokenizerOp"
;
}
Status
Compute
(
const
TensorRow
&
input
,
TensorRow
*
output
)
override
;
protected:
...
...
mindspore/ccsrc/minddata/dataset/text/kernels/bert_tokenizer_op.h
浏览文件 @
a3062640
...
...
@@ -42,8 +42,6 @@ class BertTokenizerOp : public TensorOp {
~
BertTokenizerOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"BertTokenizerOp"
;
}
Status
Compute
(
const
TensorRow
&
input
,
TensorRow
*
output
)
override
;
std
::
string
Name
()
const
override
{
return
kBertTokenizerOp
;
}
...
...
mindspore/ccsrc/minddata/dataset/text/kernels/case_fold_op.h
浏览文件 @
a3062640
...
...
@@ -31,8 +31,6 @@ class CaseFoldOp : public TensorOp {
~
CaseFoldOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"CaseFoldOp"
;
}
Status
Compute
(
const
std
::
shared_ptr
<
Tensor
>
&
input
,
std
::
shared_ptr
<
Tensor
>
*
output
)
override
;
std
::
string
Name
()
const
override
{
return
kCaseFoldOp
;
}
...
...
mindspore/ccsrc/minddata/dataset/text/kernels/jieba_tokenizer_op.h
浏览文件 @
a3062640
...
...
@@ -46,8 +46,7 @@ class JiebaTokenizerOp : public TensorOp {
~
JiebaTokenizerOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"JiebaTokenizerOp: "
<<
jieba_mode_
<<
"hmm_model_path_ "
<<
hmm_model_path_
<<
"mp_dict_path_"
<<
mp_dict_path_
;
out
<<
Name
()
<<
": "
<<
jieba_mode_
<<
"hmm_model_path_ "
<<
hmm_model_path_
<<
"mp_dict_path_"
<<
mp_dict_path_
;
}
Status
Compute
(
const
TensorRow
&
input
,
TensorRow
*
output
)
override
;
...
...
mindspore/ccsrc/minddata/dataset/text/kernels/normalize_utf8_op.h
浏览文件 @
a3062640
...
...
@@ -39,8 +39,6 @@ class NormalizeUTF8Op : public TensorOp {
~
NormalizeUTF8Op
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"NormalizeUTF8Op"
;
}
Status
Compute
(
const
std
::
shared_ptr
<
Tensor
>
&
input
,
std
::
shared_ptr
<
Tensor
>
*
output
)
override
;
std
::
string
Name
()
const
override
{
return
kNormalizeUTF8Op
;
}
...
...
mindspore/ccsrc/minddata/dataset/text/kernels/regex_replace_op.h
浏览文件 @
a3062640
...
...
@@ -38,8 +38,6 @@ class RegexReplaceOp : public TensorOp {
~
RegexReplaceOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"RegexReplaceOp"
;
}
Status
Compute
(
const
std
::
shared_ptr
<
Tensor
>
&
input
,
std
::
shared_ptr
<
Tensor
>
*
output
)
override
;
std
::
string
Name
()
const
override
{
return
kRegexReplaceOp
;
}
...
...
mindspore/ccsrc/minddata/dataset/text/kernels/regex_tokenizer_op.h
浏览文件 @
a3062640
...
...
@@ -43,8 +43,6 @@ class RegexTokenizerOp : public TensorOp {
~
RegexTokenizerOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"RegexTokenizerOp"
;
}
Status
Compute
(
const
TensorRow
&
input
,
TensorRow
*
output
)
override
;
protected:
...
...
mindspore/ccsrc/minddata/dataset/text/kernels/sentence_piece_tokenizer_op.h
浏览文件 @
a3062640
...
...
@@ -45,7 +45,7 @@ class SentencePieceTokenizerOp : public TensorOp {
Status
GetModelRealPath
(
const
std
::
string
&
model_path
,
const
std
::
string
&
filename
);
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"SentencePieceTokenizerOp
out_type = "
<<
out_type_
<<
" load_type = "
<<
load_type_
;
out
<<
Name
()
<<
"
out_type = "
<<
out_type_
<<
" load_type = "
<<
load_type_
;
}
Status
Compute
(
const
std
::
shared_ptr
<
Tensor
>
&
input
,
std
::
shared_ptr
<
Tensor
>
*
output
)
override
;
...
...
mindspore/ccsrc/minddata/dataset/text/kernels/sliding_window_op.h
浏览文件 @
a3062640
...
...
@@ -52,10 +52,6 @@ class SlidingWindowOp : public TensorOp {
/// \return Status return code
Status
OutputShape
(
const
std
::
vector
<
TensorShape
>
&
inputs
,
std
::
vector
<
TensorShape
>
&
outputs
)
override
;
/// \brief Print args for debugging.
/// \param[in] out - std::ostream &out.
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"SliceWindowOp"
;
}
/// \brief Print name of op.
std
::
string
Name
()
const
override
{
return
kSlidingWindowOp
;
}
...
...
mindspore/ccsrc/minddata/dataset/text/kernels/truncate_sequence_pair_op.h
浏览文件 @
a3062640
...
...
@@ -36,8 +36,6 @@ class TruncateSequencePairOp : public TensorOp {
~
TruncateSequencePairOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"TruncateSequencePairOp"
;
}
Status
Compute
(
const
TensorRow
&
input
,
TensorRow
*
output
)
override
;
std
::
string
Name
()
const
override
{
return
kTruncateSequencePairOp
;
}
...
...
mindspore/ccsrc/minddata/dataset/text/kernels/unicode_char_tokenizer_op.h
浏览文件 @
a3062640
...
...
@@ -33,8 +33,6 @@ class UnicodeCharTokenizerOp : public TensorOp {
~
UnicodeCharTokenizerOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"UnicodeCharTokenizerOp"
;
}
Status
Compute
(
const
TensorRow
&
input
,
TensorRow
*
output
)
override
;
std
::
string
Name
()
const
override
{
return
kUnicodeCharTokenizerOp
;
}
...
...
mindspore/ccsrc/minddata/dataset/text/kernels/unicode_script_tokenizer_op.h
浏览文件 @
a3062640
...
...
@@ -36,8 +36,6 @@ class UnicodeScriptTokenizerOp : public TensorOp {
~
UnicodeScriptTokenizerOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"UnicodeScriptTokenizerOp"
;
}
Status
Compute
(
const
TensorRow
&
input
,
TensorRow
*
output
)
override
;
std
::
string
Name
()
const
override
{
return
kUnicodeScriptTokenizerOp
;
}
...
...
mindspore/ccsrc/minddata/dataset/text/kernels/whitespace_tokenizer_op.h
浏览文件 @
a3062640
...
...
@@ -33,8 +33,6 @@ class WhitespaceTokenizerOp : public TensorOp {
~
WhitespaceTokenizerOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"WhitespaceTokenizerOp"
;
}
Status
Compute
(
const
TensorRow
&
input
,
TensorRow
*
output
)
override
;
std
::
string
Name
()
const
override
{
return
kWhitespaceTokenizerOp
;
}
...
...
mindspore/ccsrc/minddata/dataset/text/kernels/wordpiece_tokenizer_op.h
浏览文件 @
a3062640
...
...
@@ -44,8 +44,6 @@ class WordpieceTokenizerOp : public TensorOp {
~
WordpieceTokenizerOp
()
override
=
default
;
void
Print
(
std
::
ostream
&
out
)
const
override
{
out
<<
"WordpieceTokenizerOp"
;
}
Status
Compute
(
const
TensorRow
&
input
,
TensorRow
*
output
)
override
;
protected:
...
...
tests/ut/cpp/dataset/batch_op_test.cc
浏览文件 @
a3062640
...
...
@@ -78,7 +78,10 @@ std::shared_ptr<de::ExecutionTree> Build(std::vector<std::shared_ptr<de::Dataset
TEST_F
(
MindDataTestBatchOp
,
TestSimpleBatch
)
{
std
::
string
schema_file
=
datasets_root_path_
+
"/testBatchDataset/test.data"
;
bool
success
=
false
;
auto
tree
=
Build
({
TFReader
(
schema_file
),
Batch
(
12
)});
const
std
::
shared_ptr
<
de
::
BatchOp
>
&
op
=
Batch
(
12
);
EXPECT_EQ
(
op
->
Name
(),
"BatchOp"
);
auto
tree
=
Build
({
TFReader
(
schema_file
),
op
});
tree
->
Prepare
();
Status
rc
=
tree
->
Launch
();
if
(
rc
.
IsError
())
{
...
...
tests/ut/cpp/dataset/concatenate_op_test.cc
浏览文件 @
a3062640
...
...
@@ -54,13 +54,5 @@ TEST_F(MindDataTestConcatenateOp, TestOp) {
ASSERT_TRUE
(
output
->
type
()
==
expected
->
type
());
MS_LOG
(
DEBUG
)
<<
*
output
<<
std
::
endl
;
MS_LOG
(
DEBUG
)
<<
*
expected
<<
std
::
endl
;
ASSERT_TRUE
(
*
output
==
*
expected
);
// std::vector<TensorShape> inputs = {TensorShape({3})};
// std::vector<TensorShape> outputs = {};
// s = op->OutputShape(inputs, outputs);
// EXPECT_TRUE(s.IsOk());
// ASSERT_TRUE(outputs[0] == TensorShape{6});
// MS_LOG(INFO) << "MindDataTestConcatenateOp-TestOp end.";
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录