在 Windows 10 上获取 Lua 运行 手电筒(具有有限的管理员权限)
Get Lua running with Torch on Windows 10 (with limited admin rights)
Setting up Deep Learning Framework [Lua, Torch]:
我需要设置 Lua 运行 Torch
在 Windows10 和 ZeroBrane IDE 上,安装软件的可能性有限且下载权限受限。
我花了这么长时间,所以我想我可以为你们分享一个食谱。如果对你有帮助我会很高兴
- (管理员)Download/Install tdm64/gcc/5.1.0-2.exe 编译器
- (管理员)Download/Install ZeroBrane(Lua IDE)
- 下载 lua/5.3.4.tar.gz (https://www.lua.org/download.html)
- 写入批处理文件build.cmd
@echo off
setlocal
:: you may change the following variable's value
:: to suit the downloaded version
set lua_version=5.3.4
set work_dir=%~dp0
:: Removes trailing backslash
:: to enhance readability in the following steps
set work_dir=%work_dir:~0,-1%
set lua_install_dir=%work_dir%\lua
set compiler_bin_dir=%work_dir%\tdm-gcc\bin
set lua_build_dir=%work_dir%\lua-%lua_version%
set path=%compiler_bin_dir%;%path%
cd /D %lua_build_dir%
mingw32-make PLAT=mingw
echo.
echo **** COMPILATION TERMINATED ****
echo.
echo **** BUILDING BINARY DISTRIBUTION ****
echo.
:: create a clean "binary" installation
mkdir %lua_install_dir%
mkdir %lua_install_dir%\doc
mkdir %lua_install_dir%\bin
mkdir %lua_install_dir%\include
copy %lua_build_dir%\doc\*.* %lua_install_dir%\doc\*.*
copy %lua_build_dir%\src\*.exe %lua_install_dir%\bin\*.*
copy %lua_build_dir%\src\*.dll %lua_install_dir%\bin\*.*
copy %lua_build_dir%\src\luaconf.h %lua_install_dir%\include\*.*
copy %lua_build_dir%\src\lua.h %lua_install_dir%\include\*.*
copy %lua_build_dir%\src\lualib.h %lua_install_dir%\include\*.*
copy %lua_build_dir%\src\lauxlib.h %lua_install_dir%\include\*.*
copy %lua_build_dir%\src\lua.hpp %lua_install_dir%\include\*.*
echo.
echo **** BINARY DISTRIBUTION BUILT ****
echo.
%lua_install_dir%\bin\lua.exe -e"print [[Hello!]];print[[Simple Lua test successful!!!]]"
echo.
pause
SETTING UP TORCH UNDER LUA ON WINDOWS
--- 又快又脏 ---
- 从以下位置下载并解压缩所需的二进制版本:https://github.com/hiili/WindowsTorch
生成user.lua文件在C:\Users\Name.zbstudio:
path.lua = [[C:\app\tools\torch\bin\luajit.exe]]
将 C:\app\tools\torch\lua 文件夹移动到 C:\app\tools\torch\bin
--- 未经测试的替代方案 ---
未测试,但我鼓励你:https://github.com/torch/torch7/wiki/Windows#cmder
也许第二个最佳选择是使用 linux
构建虚拟环境
注意:可以在此处找到有关 Torch 的更多信息
https://github.com/soumith/cvpr2015/blob/master/cvpr-torch.pdf
GET STARTED WITH LUA AND TORCH
http://torch.ch/docs/tutorials.html
我推荐 Torch 视频教程来直接了解基础知识 (https://github.com/Atcold/torch-Video-Tutorials)
这是一份供进一步阅读的 Torch 速查表 (https://github.com/torch/torch7/wiki/Cheatsheet):
- 新手
- 安装和 运行 手电筒
- 安装包
- 按类别分类的教程、演示
- 加载流行的数据集
- 按类别列出的包
Setting up Deep Learning Framework [Lua, Torch]:
我需要设置 Lua 运行 Torch 在 Windows10 和 ZeroBrane IDE 上,安装软件的可能性有限且下载权限受限。
我花了这么长时间,所以我想我可以为你们分享一个食谱。如果对你有帮助我会很高兴
- (管理员)Download/Install tdm64/gcc/5.1.0-2.exe 编译器
- (管理员)Download/Install ZeroBrane(Lua IDE)
- 下载 lua/5.3.4.tar.gz (https://www.lua.org/download.html)
- 写入批处理文件build.cmd
@echo off
setlocal
:: you may change the following variable's value
:: to suit the downloaded version
set lua_version=5.3.4
set work_dir=%~dp0
:: Removes trailing backslash
:: to enhance readability in the following steps
set work_dir=%work_dir:~0,-1%
set lua_install_dir=%work_dir%\lua
set compiler_bin_dir=%work_dir%\tdm-gcc\bin
set lua_build_dir=%work_dir%\lua-%lua_version%
set path=%compiler_bin_dir%;%path%
cd /D %lua_build_dir%
mingw32-make PLAT=mingw
echo.
echo **** COMPILATION TERMINATED ****
echo.
echo **** BUILDING BINARY DISTRIBUTION ****
echo.
:: create a clean "binary" installation
mkdir %lua_install_dir%
mkdir %lua_install_dir%\doc
mkdir %lua_install_dir%\bin
mkdir %lua_install_dir%\include
copy %lua_build_dir%\doc\*.* %lua_install_dir%\doc\*.*
copy %lua_build_dir%\src\*.exe %lua_install_dir%\bin\*.*
copy %lua_build_dir%\src\*.dll %lua_install_dir%\bin\*.*
copy %lua_build_dir%\src\luaconf.h %lua_install_dir%\include\*.*
copy %lua_build_dir%\src\lua.h %lua_install_dir%\include\*.*
copy %lua_build_dir%\src\lualib.h %lua_install_dir%\include\*.*
copy %lua_build_dir%\src\lauxlib.h %lua_install_dir%\include\*.*
copy %lua_build_dir%\src\lua.hpp %lua_install_dir%\include\*.*
echo.
echo **** BINARY DISTRIBUTION BUILT ****
echo.
%lua_install_dir%\bin\lua.exe -e"print [[Hello!]];print[[Simple Lua test successful!!!]]"
echo.
pause
SETTING UP TORCH UNDER LUA ON WINDOWS
--- 又快又脏 ---
- 从以下位置下载并解压缩所需的二进制版本:https://github.com/hiili/WindowsTorch
生成user.lua文件在C:\Users\Name.zbstudio:
path.lua = [[C:\app\tools\torch\bin\luajit.exe]]
将 C:\app\tools\torch\lua 文件夹移动到 C:\app\tools\torch\bin
--- 未经测试的替代方案 ---
未测试,但我鼓励你:https://github.com/torch/torch7/wiki/Windows#cmder 也许第二个最佳选择是使用 linux
构建虚拟环境注意:可以在此处找到有关 Torch 的更多信息 https://github.com/soumith/cvpr2015/blob/master/cvpr-torch.pdf
GET STARTED WITH LUA AND TORCH
http://torch.ch/docs/tutorials.html 我推荐 Torch 视频教程来直接了解基础知识 (https://github.com/Atcold/torch-Video-Tutorials)
这是一份供进一步阅读的 Torch 速查表 (https://github.com/torch/torch7/wiki/Cheatsheet): - 新手 - 安装和 运行 手电筒 - 安装包 - 按类别分类的教程、演示 - 加载流行的数据集 - 按类别列出的包