Tensorflow-Neuroevolution
Tensorflow-Neuroevolution copied to clipboard
Evaluation on GPU runs in OOM Issues when trying to allocate 10k images all at once
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))
thanks Hyang