Tensorflow-Neuroevolution icon indicating copy to clipboard operation
Tensorflow-Neuroevolution copied to clipboard

Evaluation on GPU runs in OOM Issues when trying to allocate 10k images all at once

Open hyang0129 opened this issue 4 years ago • 1 comments

https://github.com/PaulPauls/Tensorflow-Neuroevolution/blob/55c76f08ee4e4206d842565902b3d11c517c3756/tfne/environments/cifar10_environment.py#L87

The above line instructs the GPU to make a prediction on all 10k test images at once. Please switch to the model.predict(data, batchsize) method.

predictions = model.predict(self.test_images, batch_size = self.batch_size) self.accuracy_metric.update_state(self.squeezed_test_labels, np.argmax(predictions, axis=-1))

hyang0129 avatar Apr 08 '21 23:04 hyang0129

thanks Hyang

joshianirudh avatar Jul 20 '22 16:07 joshianirudh