How to set zerobrane studio environment variable

I install the entire torch package in my local file torch distribution (followed by this tutorial ). I want to use Zerobraneto debug my code. Zerobranecannot find my local torch path. How to set your local path to an environment variable Zerobrane.
I tried adding path.lua = "$ {prefix} / torch-distro / install / bin / luajit" to user.lua. But he can't work

+4
source share
2 answers

The following method works on the linux platform:

  • Configuring the luajit interpreter by adding the following code to user.lua

    path.lua = "your_path/luajit"

  • envrioment /opt/zbsstudio/lualibs/mobdebug/mobdebug.lua

    package.path = package.path.. '; my_path/?/init.lua' package.cpath = package.cpath.. '; my_path/?. so'

+2

( Torch Windows, Linux/OSX ).

, Torch C:\Program Files\Torch, , ZeroBrane Studio (ZBS), path.lua=[[C:\Program Files\Torch\bin\torch-lua]] <ZBS>\cfg\user.lua.

, Lua script ZBS (Project | Run F6), Torch:

local torch = require 'torch'
local data = torch.Tensor{
   {68, 24, 20},
   {74, 26, 21},
   {80, 32, 24}
}
print(data)

Windows ( , , , ). ZBS luasocket, lua51.dll, Torch libtorch-lua.dll, luasocket (Torch) , , . , - DLL Torch/bin.

- DLL, Visual Studio ++ mingw/gcc :

  • mkforwardlib.lua (VS) mkforwardlib-gcc.lua (mingw/gcc) script Lua Proxy DLL3.
  • lua mkforwardlib.lua libtorch-lua lua51 X86; , lua51.dll .
  • lua51.dll Torch\bin.

, Project | Start Debugging.

0

All Articles