how to execute a .lua file in torch?

1,333 views
Skip to first unread message

Ethan Gao

unread,
Sep 23, 2015, 1:56:52 PM9/23/15
to torch7
Hello guys, I'm totally new to Torch. I have installed torch on my MAC, but having problem to run the .lua file. On tutorial, it says use $ th file.lua  command , but where should I put this file.lua then torch can find it?

Many thanks.

Vislab

unread,
Sep 23, 2015, 2:54:25 PM9/23/15
to torch7
dofile 'file1.lua' or paths.dofile('file1.lua')

Ethan Gao

unread,
Sep 23, 2015, 4:01:29 PM9/23/15
to torch7
I tried dofile 'test.lua' , but it says -bash: dofile: command not found

Andreas Köpf

unread,
Sep 23, 2015, 4:39:56 PM9/23/15
to torch7

(..) but where should I put this file.lua then torch can find it?

It has to be in the current directory. You might want to check a linux shell tutorial first, e.g. try http://linuxcommand.org/
Reply all
Reply to author
Forward
0 new messages