提交 9bda14f3 编写于 作者: L liuqi

Resize output of every run for different input size.

上级 15a0c2b2
......@@ -24,14 +24,15 @@ void ResizeBilinearFunctor<DeviceType::OPENCL, T>::operator()(
const index_t out_height = out_height_;
const index_t out_width = out_width_;
if (kernel_.get() == nullptr) {
MACE_CHECK(out_height > 0 && out_width > 0);
std::vector<index_t> output_shape{batch, out_height, out_width, channels};
MACE_CHECK(out_height > 0 && out_width > 0);
std::vector<index_t> output_shape{batch, out_height, out_width, channels};
std::vector<size_t> output_image_shape;
CalImage2DShape(output_shape, BufferType::IN_OUT_CHANNEL,
output_image_shape);
output->ResizeImage(output_shape, output_image_shape);
std::vector<size_t> output_image_shape;
CalImage2DShape(output_shape, BufferType::IN_OUT_CHANNEL,
output_image_shape);
output->ResizeImage(output_shape, output_image_shape);
if (kernel_.get() == nullptr) {
float height_scale =
CalculateResizeScale(in_height, out_height, align_corners_);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册