

TITLE
Fix an efficiency related bug the "prediction_loop" of trainer_tf.py

COMMENTS
1

REACTIONS
+1: 0
-1: 0
laugh: 0
hooray: 0
heart: 0
rocket: 0
eyes: 0

BODY
# the "numpy.append" method is not suitable for large evaluation/test dataset
It will cause "memory ops blocked issue" (i.e. system wait for a large area of continuous memory to expand the array) because numpy array requires continuous memory, and will try to re-allocate a ram space when the current capacity is not enough
### this procedure is quite slow(as if the prediction loop is blocked): tested when data set size  is larger than 10K

### we need to use the concatenate strategy(for efficiency) or batch generator strategy(when the data size is quite large).
### The method I provided here will significantly boost the prediction speed.