File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -170,23 +170,22 @@ paddle_error paddle_gradient_machine_get_layer_output(
170170}
171171
172172paddle_error paddle_check_args_empty (paddle_arguments inArgs, int * notEmpty) {
173- notEmpty auto in = paddle::capi::cast<paddle::capi::CArguments>(inArgs);
173+ auto in = paddle::capi::cast<paddle::capi::CArguments>(inArgs);
174174 if (in == nullptr || notEmpty == nullptr ) return kPD_NULLPTR ;
175175
176176 paddle_matrix result = paddle_matrix_create_none ();
177-
178- int height = 0 , width = 0 ;
179-
180177 paddle_error res_err = paddle_arguments_get_value (in, 0 , result);
181178 if (res_err == kPD_OUT_OF_RANGE || res_err == kPD_NULLPTR ) {
182179 *notEmpty = 0 ;
183180 CHECK (paddle_matrix_destroy (result));
181+
184182 return kPD_NO_ERROR ;
185183 }
186184
185+ int height = 0 , width = 0 ;
187186 CHECK (paddle_matrix_get_shape (result, &height, &width));
188187 CHECK (paddle_matrix_destroy (result));
189-
190188 *notEmpty = height;
189+
191190 return kPD_NO_ERROR ;
192191}
You can’t perform that action at this time.
0 commit comments