From 170e78b397da7f4b64024c4c6b59758b07791ec6 Mon Sep 17 00:00:00 2001 From: peizhilin Date: Tue, 25 Dec 2018 17:30:56 +0800 Subject: [PATCH] restore the top-k test=develop --- paddle/fluid/operators/top_k_op.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/paddle/fluid/operators/top_k_op.cc b/paddle/fluid/operators/top_k_op.cc index c80eaefaae6..c17d1afc309 100644 --- a/paddle/fluid/operators/top_k_op.cc +++ b/paddle/fluid/operators/top_k_op.cc @@ -30,8 +30,6 @@ class TopkOp : public framework::OperatorWithKernel { "Output(Indices) of TopkOp should not be null."); auto input_dims = ctx->GetInputDim("X"); - PADDLE_ENFORCE_EQ(input_dims.size(), 2, - "Rank of TopK op's input must be 2."); const int k = static_cast(ctx->Attrs().Get("k")); PADDLE_ENFORCE_GE(k, 1, "k must >= 1"); -- GitLab