建立深度学习框架[Lua,Torch]:
我需要设置使用 Torch 运行的 Lua 在 Windows 10 和 ZeroBrane IDE 上,安装软件和限制下载权限的可能性有限。
我花了这么长时间,所以我想我可能会为你们分享食谱。如果它对你有所帮助,我会很高兴。
答案 0 :(得分:3)
@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
在WINDOWS的LUA下设置TORCH
---又快又脏---
在C:\ Users \ Name.zbstudio:
中生成user.lua文件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
开始使用LUA和TORCH
http://torch.ch/docs/tutorials.html 我建议使用Torch Video Tutorials直接获得基础知识(https://github.com/Atcold/torch-Video-Tutorials)
这是一张Torch Cheetsheet供进一步阅读(https://github.com/torch/torch7/wiki/Cheatsheet): - 新手 - 安装和运行Torch - 安装包 - 教程,按类别演示 - 加载热门数据集 - 按类别列出的包裹