forked from mindspore-Ecosystem/mindspore
!49069 [MS]修复SparseSoftmaxCrossEntropyWithLogitsV2算子fuzz crash
Merge pull request !49069 from zhuguodong/for_cross_op
This commit is contained in:
commit
d36d61b744
|
@ -38,11 +38,12 @@ abstract::TupleShapePtr SparseSoftmaxCrossEntropyWithLogitsV2InferShape(
|
||||||
if (!IsDynamic(features_shape)) {
|
if (!IsDynamic(features_shape)) {
|
||||||
(void)CheckAndConvertUtils::CheckInteger("dimension of labels", SizeToLong(labels_shape.size()), kEqual,
|
(void)CheckAndConvertUtils::CheckInteger("dimension of labels", SizeToLong(labels_shape.size()), kEqual,
|
||||||
labels_rank, op_name);
|
labels_rank, op_name);
|
||||||
|
(void)CheckAndConvertUtils::CheckInteger("dimension of logits(features)", SizeToLong(features_shape.size()), kEqual,
|
||||||
|
features_rank, op_name);
|
||||||
(void)CheckAndConvertUtils::CheckInteger("batch of logits(features)", features_shape[kInputIndex0], kEqual,
|
(void)CheckAndConvertUtils::CheckInteger("batch of logits(features)", features_shape[kInputIndex0], kEqual,
|
||||||
labels_shape[kInputIndex0], op_name);
|
labels_shape[kInputIndex0], op_name);
|
||||||
}
|
}
|
||||||
(void)CheckAndConvertUtils::CheckInteger("dimension of logits(features)", SizeToLong(features_shape.size()), kEqual,
|
|
||||||
features_rank, op_name);
|
|
||||||
auto loss_shape = labels_shape;
|
auto loss_shape = labels_shape;
|
||||||
auto backprop_shape = features_shape;
|
auto backprop_shape = features_shape;
|
||||||
abstract::ShapePtr loss_shape_ptr, backprop_shape_ptr;
|
abstract::ShapePtr loss_shape_ptr, backprop_shape_ptr;
|
||||||
|
|
Loading…
Reference in New Issue