How to call a lua script, using torch from iOS

191 views
Skip to first unread message

Anali Sakhala

unread,
Apr 10, 2015, 7:48:52 PM4/10/15
to tor...@googlegroups.com
Hi,

I have close to zero knowledge in lua and torch. I have a script which uses torch library, what I want to do is call this script from within Xcode. I have imported the torch library in my Xcode project, but no clue where to go from there.

The lua script imports the following:

require 'torch'   -- torch
require 'image'   -- for image transforms
require 'nn'      -- provides a normalization operator
require 'optim'   -- an optimization package, for online and batch methods

and the way I run it usually is by doing "th main.lua", and the output is printed on the screen. Now I was to be able to do the same thing but from Xcode. I want to call the script and display its output. I have struggled finding any documentation regarding this, any help is appreciated.

Thank You

smth chntla

unread,
Apr 12, 2015, 6:37:16 PM4/12/15
to tor...@googlegroups.com
Hey Anali,

Calling it from xcode/torch-ios is almost the same process. If you wait a few days a user as agreed to cleanup and open-source his iOS torch hello-world.
--
S

Anali Sakhala

unread,
Apr 13, 2015, 11:18:40 AM4/13/15
to torch7 on behalf of smth chntla
Hey,
Thanks for getting back to me.

The only way I know to run the script is by doing something like "th main.lua" or "luajit main.lua".

My main.lua has the following import files:

require 'torch'   -- torch
require 'image'   -- for image transforms
require 'nn'      -- provides a normalization operator
require 'optim'   -- an optimization package, for online and batch methods

I want to run this main.lua from Xcode. Will the example show how to do that?

Thank You

--
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/mGEeCkNHlmQ/unsubscribe.
To unsubscribe from this group and all its topics, 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.



--

Anali Sakhala

M. Eng, Computer Science - Class of 2015

CORNELL TECH

111 8th Avenue #302 New York, NY 10011

e. aps...@cornell.edu

p. 650-450-2328
Inline image 1

soumith

unread,
Apr 13, 2015, 11:22:05 AM4/13/15
to torch7 on behalf of Anali Sakhala
Yes it will show you how to do that.

--
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.

Anali Sakhala

unread,
May 15, 2015, 11:36:02 PM5/15/15
to torch7 on behalf of smth chntla
Hey,

I was wondering if the example is there yet?

Thank You
Reply all
Reply to author
Forward
0 new messages