File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ class L1NormKernel : public framework::OpKernel<T> {
29
29
Out->mutable_data <T>(context.GetPlace ());
30
30
31
31
auto x = framework::EigenVector<T>::Flatten (*X);
32
- auto out = framework::EigenVector <T>::Flatten (*Out);
32
+ auto out = framework::EigenScalar <T>::From (*Out);
33
33
auto place = context.GetEigenDevice <Place>();
34
34
35
35
out.device (place) = x.abs ().sum ();
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ class SquaredL2NormKernel : public framework::OpKernel<T> {
29
29
Out->mutable_data <T>(context.GetPlace ());
30
30
31
31
auto x = framework::EigenVector<T>::Flatten (*X);
32
- auto out = framework::EigenVector <T>::Flatten (*Out);
32
+ auto out = framework::EigenScalar <T>::From (*Out);
33
33
auto place = context.GetEigenDevice <Place>();
34
34
35
35
out.device (place) = x.square ().sum ();
You can’t perform that action at this time.
0 commit comments