Fix comment for norm_op

detection_output_fixbug
xuwei06 7 years ago
parent 6ecbf08372
commit 0ef9dc6122

@ -39,7 +39,7 @@ class NormOpMaker : public framework::OpProtoAndCheckerMaker {
"M = C * H * W");
AddComment(R"DOC(
"Input shape: $(N, C, H, W)$
Sclae shape: $(C, 1)$
Scale shape: $(C, 1)$
Output shape: $(N, C, H, W)$
Where
forward

@ -66,7 +66,7 @@ class NormKernel : public framework::OpKernel<T> {
context.GetPlace());
auto tmp = framework::EigenVector<T, Eigen::RowMajor,
Eigen::DenseIndex>::Flatten(tmp_tensor);
// get colsum and sqrt , inverse
// get colsum and sqrt , inverse
auto dim = Eigen::array<int, 1>({{0}});
tmp.device(*place) = x_square_batch_eigen.sum(dim);
tmp.device(*place) = (tmp + epsilon).sqrt().inverse();

Loading…
Cancel
Save