提交 dcb4ab25 编写于 作者: L Liu Yiqun

Fix the compiling error because of the modification of DDimLite's function.

test=develop
上级 97df75b2
......@@ -28,7 +28,7 @@ void scale_compute_ref(const operators::ScaleParam& param) {
dtype* output_data = param.output->mutable_data<dtype>();
DDim x_dims = param.x->dims();
DDim output_dims = param.output->dims();
ASSERT_EQ(x_dims.data(), output_dims.data());
ASSERT_EQ(x_dims, output_dims);
bool bias_after_scale = param.bias_after_scale;
float scale = param.scale;
float bias = param.bias;
......
......@@ -157,8 +157,9 @@ void SliceCompute<T, PType>::Run() {
auto new_out_dims = out->dims();
const auto* x_data = in->template data<T>();
auto* o_data = out->template mutable_data<T>();
std::vector<int64_t> in_dims_data = in_dims.Vectorize();
lite::arm::math::slice(
x_data, in_dims.data(), axes, starts, ends, o_data, &ctx);
x_data, in_dims_data, axes, starts, ends, o_data, &ctx);
}
} // namespace arm
......
......@@ -29,7 +29,7 @@ void softmax_compute_ref(const operators::SoftmaxParam& param) {
const dtype* x_data = param.x->mutable_data<const dtype>();
dtype* output_data = param.output->mutable_data<dtype>();
DDim x_dims = param.x->dims();
ASSERT_EQ(x_dims.data(), param.output->dims().data());
ASSERT_EQ(x_dims, param.output->dims());
auto x_rank = x_dims.size();
int axis = param.axis;
if (axis < 0) {
......
......@@ -33,7 +33,7 @@ static void softmax_compute_ref(const operators::SoftmaxParam& param) {
const dtype* x_data = param.x->mutable_data<const dtype>();
dtype* output_data = param.output->mutable_data<dtype>();
DDim x_dims = param.x->dims();
ASSERT_EQ(x_dims.data(), param.output->dims().data());
ASSERT_EQ(x_dims, param.output->dims());
auto x_rank = x_dims.size();
int axis = param.axis;
if (axis < 0) {
......
......@@ -35,7 +35,7 @@ void TransposeCompute::Run() {
float* out = Out->mutable_data<float>(TARGET(kCUDA));
int ndim = X->dims().size();
std::vector<int64_t> dims = X->dims().data();
std::vector<int64_t> dims = X->dims().Vectorize();
// NCHW -> NHWC
if (axes.size() == 4 && axes[0] == 0 && axes[1] == 2 && axes[2] == 3 &&
......
......@@ -30,7 +30,7 @@ void activation_compute_ref(const operators::ActivationParam& param) {
auto output_data = param.Out->mutable_data<dtype>();
DDim x_dims = param.X->dims();
DDim output_dims = param.Out->dims();
ASSERT_EQ(x_dims.data(), output_dims.data());
ASSERT_EQ(x_dims, output_dims);
for (int i = 0; i < output_dims.production(); i++) {
output_data[i] = std::max(0.f, x_data[i]);
}
......
......@@ -29,7 +29,7 @@ void softmax_compute_ref(const operators::SoftmaxParam& param) {
const dtype* x_data = param.x->mutable_data<const dtype>();
dtype* output_data = param.output->mutable_data<dtype>();
DDim x_dims = param.x->dims();
ASSERT_EQ(x_dims.data(), param.output->dims().data());
ASSERT_EQ(x_dims, param.output->dims());
auto x_rank = x_dims.size();
int axis = param.axis;
if (axis < 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册