Is there any way I can pass existing images in my system through a trained VGG with torch? I am using Ubuntu 14.04 and unfortunately do not have a GPU. I have searched quite extensively but all the ones I have found require a GPU. Are there other ways to use VGG without torch? I'm open to suggestions but the method should not require a GPU.
Asked
Active
Viewed 665 times
1 Answers
0
While running the network using a GPU will make things a lot faster, you can run the network in CPU mode only.
Once you load the model, pretrained on a GPU you can simple convert it to CPU as follow:
model = model:float()
You can easily load an image from your computer with the help of the image library and then do a forward pass
local img = image.load(imagefile,3,'byte')
local output = model:forward(img)

A B
- 497
- 2
- 9
-
Thanks a lot! Which VGG model are you talking about and where can I find it? – Sibi Jul 06 '16 at 11:22
-
@Sibi You can find here a list of the available pretrained networks: https://github.com/torch/torch7/wiki/ModelZoo (they are caffe models), and you can load them as a torch model using loadcaffe module as described in the link from above. – A B Jul 06 '16 at 23:52