Hvass-Labs / TensorFlow-Tutorials

TensorFlow Tutorials with YouTube Videos
MIT License
9.27k stars 4.19k forks source link

Feed Forward Pre-trained Inception in Batches #73

Closed IdoWSC closed 6 years ago

IdoWSC commented 6 years ago

Hi, I am trying to use the Inception model used in the transfer learning tutorial. Specifically, I'm trying to use it with a batch size bigger then 1, to better utilize GPU's capabilities.

When looking at self.resized_image we get: <tf.Tensor 'ResizeBilinear:0' shape=(1, 299, 299, 3) dtype=float32>

shape[0] = 1 means that the net will except only batch size of size 1.

Does anybody know if it can be modified to support a bigger batch size? If it requires to bypass the image resizing its obviously also acceptable.

Thanks allot!

Hvass-Labs commented 6 years ago

It has been so long since I did that tutorial that I don't remember. But I now generally recommend that you use Keras for doing Transfer Learning (see Tutorial 10) instead of the old and more direct ways in TensorFlow.