diff --git a/src/framework/tensor.h b/src/framework/tensor.h index 403768f858d3ff93c592768822a21b32234e16d8..6fc16a01a2874f04ecea3edb89774f4deea93dd5 100644 --- a/src/framework/tensor.h +++ b/src/framework/tensor.h @@ -351,9 +351,12 @@ inline Print &operator<<(Print &printer, const Tensor &tensor) { printer << " dims: " << tensor.dims() << "\n"; int stride = tensor.numel() / 20; stride = stride > 0 ? stride : 1; +#ifndef PADDLE_MOBILE_FPGA for (int i = 0; i < tensor.numel(); i += stride) { printer << tensor.data()[i] << " "; } +#endif + return printer; }