Skip to content

Commit

Permalink
Merge pull request #211 from tianxin1860/develop
Browse files Browse the repository at this point in the history
enable gc for predict_classify
  • Loading branch information
tianxin authored Jul 18, 2019
2 parents 85cf2ee + 8dc2d4b commit a4e5b9f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ERNIE/predict_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
import argparse
import numpy as np
import multiprocessing

# NOTE(paddle-dev): All of these flags should be
# set before `import paddle`. Otherwise, it would
# not take any effect.
os.environ['FLAGS_eager_delete_tensor_gb'] = '0' # enable gc

import paddle.fluid as fluid

from reader.task_reader import ClassifyReader
Expand Down

0 comments on commit a4e5b9f

Please sign in to comment.