fix ut test_recognize_digits (#24794)

revert-24981-add_device_attr_for_regulization
Qi Li 5 years ago committed by GitHub
parent 75eec3d1f6
commit a125697e2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -19,6 +19,7 @@ limitations under the License. */
#include "gtest/gtest.h"
#include "paddle/fluid/framework/executor.h"
#include "paddle/fluid/framework/io/fs.h"
#include "paddle/fluid/framework/op_registry.h"
#include "paddle/fluid/framework/program_desc.h"
#include "paddle/fluid/framework/tensor_util.h"

@ -123,8 +123,8 @@ def train(nn_type,
# get test acc and loss
acc_val = numpy.array(acc_set).mean()
avg_loss_val = numpy.array(avg_loss_set).mean()
if float(acc_val
) > 0.2: # Smaller value to increase CI speed
if float(acc_val) > 0.2 or pass_id == (PASS_NUM - 1):
# Smaller value to increase CI speed
if save_dirname is not None:
fluid.io.save_inference_model(
save_dirname, ["img"], [prediction],

Loading…
Cancel
Save