Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
4ee0bf22
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看板
提交
4ee0bf22
编写于
8月 21, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
8月 21, 2020
浏览文件
操作
浏览文件
下载
差异文件
!4820 Alarm modification
Merge pull request !4820 from shenwei41/sw_master
上级
b69b1ca8
a4e7a758
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
8 addition
and
7 deletion
+8
-7
mindspore/ccsrc/debug/debugger/debugger.cc
mindspore/ccsrc/debug/debugger/debugger.cc
+3
-3
mindspore/ccsrc/minddata/dataset/api/datasets.cc
mindspore/ccsrc/minddata/dataset/api/datasets.cc
+1
-0
mindspore/ccsrc/minddata/dataset/engine/gnn/graph_loader.h
mindspore/ccsrc/minddata/dataset/engine/gnn/graph_loader.h
+1
-2
mindspore/ccsrc/minddata/dataset/kernels/image/cutmix_batch_op.cc
...e/ccsrc/minddata/dataset/kernels/image/cutmix_batch_op.cc
+1
-2
mindspore/ccsrc/minddata/dataset/kernels/image/random_color_op.h
...re/ccsrc/minddata/dataset/kernels/image/random_color_op.h
+2
-0
未找到文件。
mindspore/ccsrc/debug/debugger/debugger.cc
浏览文件 @
4ee0bf22
...
...
@@ -149,7 +149,7 @@ void Debugger::EnableDebugger() {
last_overflow_bin_
=
0
;
DIR
*
d
;
d
=
opendir
(
overflow_bin_path_
.
c_str
());
if
(
d
)
{
if
(
d
!=
nullptr
)
{
struct
dirent
*
dir
;
while
((
dir
=
readdir
(
d
))
!=
NULL
)
{
if
(
dir
->
d_type
==
DT_REG
)
{
...
...
@@ -718,9 +718,9 @@ std::vector<std::string> Debugger::CheckOpOverflow() {
std
::
vector
<
double
>
bin_list
;
std
::
vector
<
std
::
string
>
op_names
;
DIR
*
d
;
struct
dirent
*
dir
;
struct
dirent
*
dir
=
nullptr
;
d
=
opendir
(
overflow_bin_path_
.
c_str
());
if
(
d
)
{
if
(
d
!=
nullptr
)
{
while
((
dir
=
readdir
(
d
))
!=
NULL
)
{
if
(
dir
->
d_type
==
DT_REG
)
{
std
::
string
file_path
=
overflow_bin_path_
;
...
...
mindspore/ccsrc/minddata/dataset/api/datasets.cc
浏览文件 @
4ee0bf22
...
...
@@ -609,6 +609,7 @@ Status ComputeShuffleSize(int64_t num_files, int64_t num_devices, int64_t num_ro
}
// get the average per file
CHECK_FAIL_RETURN_UNEXPECTED
(
num_files
!=
0
,
"The size of dataset_files must greater than 0."
);
avg_rows_per_file
=
num_rows
/
num_files
;
*
shuffle_size
=
std
::
max
(
avg_rows_per_file
*
average_files_multiplier
,
shuffle_max
);
...
...
mindspore/ccsrc/minddata/dataset/engine/gnn/graph_loader.h
浏览文件 @
4ee0bf22
...
...
@@ -35,6 +35,7 @@
#include "minddata/dataset/engine/gnn/node.h"
#include "minddata/dataset/util/status.h"
#include "minddata/mindrecord/include/shard_reader.h"
#include "minddata/dataset/engine/gnn/graph_data_impl.h"
namespace
mindspore
{
namespace
dataset
{
namespace
gnn
{
...
...
@@ -49,8 +50,6 @@ using EdgeFeatureMap = std::unordered_map<EdgeType, std::unordered_set<FeatureTy
using
DefaultNodeFeatureMap
=
std
::
unordered_map
<
FeatureType
,
std
::
shared_ptr
<
Feature
>>
;
using
DefaultEdgeFeatureMap
=
std
::
unordered_map
<
FeatureType
,
std
::
shared_ptr
<
Feature
>>
;
class
GraphDataImpl
;
// this class interfaces with the underlying storage format (mindrecord)
// it returns raw nodes and edges via GetNodesAndEdges
// it is then the responsibility of graph to construct itself based on the nodes and edges
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/cutmix_batch_op.cc
浏览文件 @
4ee0bf22
...
...
@@ -32,7 +32,7 @@ CutMixBatchOp::CutMixBatchOp(ImageBatchFormat image_batch_format, float alpha, f
}
void
CutMixBatchOp
::
GetCropBox
(
int
height
,
int
width
,
float
lam
,
int
*
x
,
int
*
y
,
int
*
crop_width
,
int
*
crop_height
)
{
float
cut_ratio
=
1
-
lam
;
const
float
cut_ratio
=
1
-
lam
;
int
cut_w
=
static_cast
<
int
>
(
width
*
cut_ratio
);
int
cut_h
=
static_cast
<
int
>
(
height
*
cut_ratio
);
std
::
uniform_int_distribution
<
int
>
width_uniform_distribution
(
0
,
width
);
...
...
@@ -116,7 +116,6 @@ Status CutMixBatchOp::Compute(const TensorRow &input, TensorRow *output) {
RETURN_IF_NOT_OK
(
Crop
(
rand_image
,
&
cropped
,
x
,
y
,
crop_width
,
crop_height
));
RETURN_IF_NOT_OK
(
MaskWithTensor
(
cropped
,
&
images
[
i
],
x
,
y
,
crop_width
,
crop_height
,
ImageFormat
::
HWC
));
label_lam
=
1
-
(
crop_width
*
crop_height
/
static_cast
<
float
>
(
image_shape
[
1
]
*
image_shape
[
2
]));
}
else
{
// NCHW Format
GetCropBox
(
static_cast
<
int32_t
>
(
image_shape
[
2
]),
static_cast
<
int32_t
>
(
image_shape
[
3
]),
lam
,
&
x
,
&
y
,
&
crop_width
,
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/random_color_op.h
浏览文件 @
4ee0bf22
...
...
@@ -39,6 +39,8 @@ namespace dataset {
class
RandomColorOp
:
public
TensorOp
{
public:
RandomColorOp
()
=
default
;
~
RandomColorOp
()
=
default
;
/// \brief Constructor
/// \param[in] t_lb lower bound for the random weights
/// \param[in] t_ub upper bound for the random weights
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录