Does anyone have a step-by-step guide to doing testhooks on fbcunn/Torch7

71 views
Skip to first unread message

Alison B. Lowndes

unread,
Mar 24, 2015, 6:57:12 PM3/24/15
to tor...@googlegroups.com
I've seen this but still not sure how to do it?

Similarly, if you would like to test your model on a new image, you can use testHook from line 103 in donkey.lua to load your image, and send it through the model for predictions. For example:

dofile('donkey.lua')
img = testHook({loadSize}, 'test.jpg')
model = torch.load('model_10.t7')
predictions = model:forward(img:cuda())

soumith

unread,
Mar 24, 2015, 7:27:59 PM3/24/15
to torch7 on behalf of Alison B. Lowndes
Do you understand what those commands are? Maybe having a look at donkey.lua would make it slightly clearer.
Let me know if you have specific questions.

--
You received this message because you are subscribed to the Google Groups "torch7" group.
To unsubscribe from this group and stop receiving emails from it, send an email to torch7+un...@googlegroups.com.
To post to this group, send email to tor...@googlegroups.com.
Visit this group at http://groups.google.com/group/torch7.
For more options, visit https://groups.google.com/d/optout.

Alison Lowndes

unread,
Mar 24, 2015, 11:39:14 PM3/24/15
to torch7 on behalf of Alison B. Lowndes

Am I literally running each line separately in the th IDE?


You received this message because you are subscribed to a topic in the Google Groups "torch7" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/torch7/lms9AbYP-is/unsubscribe.
To unsubscribe from this group and all its topics, send an email to torch7+un...@googlegroups.com.

soumith

unread,
Mar 25, 2015, 12:07:39 AM3/25/15
to torch7 on behalf of Alison B. Lowndes
You can either do that, or place these commands in a lua file (example: run.lua), and run it like:
th run.lua

Alison Lowndes

unread,
Mar 25, 2015, 8:13:12 AM3/25/15
to torch7 on behalf of Alison B. Lowndes
Thank you!
Reply all
Reply to author
Forward
0 new messages