diff --git a/tools/pnnx/src/pass_level5/eval_expression.cpp b/tools/pnnx/src/pass_level5/eval_expression.cpp index a48b4c97675..ab8febdbe18 100644 --- a/tools/pnnx/src/pass_level5/eval_expression.cpp +++ b/tools/pnnx/src/pass_level5/eval_expression.cpp @@ -276,14 +276,10 @@ static std::string eval_expression(const Operator* op) if (t == "round") { // round to nearest even -#if FLT_ROUNDS != FE_TONEAREST int old_rm = fegetround(); fesetround(FE_TONEAREST); -#endif float r = nearbyintf(af); -#if FLT_ROUNDS != FE_TONEAREST fesetround(old_rm); -#endif exprstack.push(std::to_string(r)); } if (t == "rsqrt") diff --git a/tools/pnnx/src/pass_ncnn/insert_reshape_numpy_binaryop_broadcast.cpp b/tools/pnnx/src/pass_ncnn/insert_reshape_numpy_binaryop_broadcast.cpp index 50b39f8d72b..bb373054a01 100644 --- a/tools/pnnx/src/pass_ncnn/insert_reshape_numpy_binaryop_broadcast.cpp +++ b/tools/pnnx/src/pass_ncnn/insert_reshape_numpy_binaryop_broadcast.cpp @@ -138,6 +138,11 @@ void insert_reshape_numpy_binaryop_broadcast(Graph& graph) reshape0_shape.insert(reshape0_shape.begin(), 1); } + if (batch_index0 != -233) + { + reshape0_shape.insert(reshape0_shape.begin() + batch_index0, 1); + } + reshape0->params["shape"] = reshape0_shape; break;