for i in range(num_batches):
data = X[i*batch_size: (i+1)*batch_size]
predictions.extend(self.model.predict(data))
return [json.dumps(targ) for targ in predictions]
def __del__(self):
self.model.clear()
After Change
for i in range(num_batches):
data = X[i*batch_size: (i+1)*batch_size]
predictions.extend(self.model.predict(data))
return predictions
def __del__(self):
self.model.clear()