Torch7安装gfx.js出错
来源:互联网 发布:网络神话的缔造者 编辑:程序博客网 时间:2024/05/23 11:58
刚学习Torch,安装gfx.js一直不成功,先要求安装node.js和npm然后装好后还是提示各种错误,最后找到一种解决方案,将gfx.js替换为display.js。
Install for Torch via:
luarocks install https://raw.githubusercontent.com/szym/display/master/display-scm-0.rockspec
Launch the server:
th -ldisplay.start [port [hostname]]
默认是localhost然后把gfx.js的内容替换为display.js即可。
The Solution
So, I installed display.js, which is much simpler and easier to install than gfx.js.
Display.js is a better alternative for gfx.js in that it is easy to install with less dependencies. Just follow the instructions writtenhere.
After installation, run the following on the terminal window:$ ~/.display/run.js &(。。。没成功,用
th -ldisplay.start
)
The display server has started and is listening on localhost, port 8000. Type the following in browserhttp://127.0.0.1:8000/
The next step is to replace all code references to gfx.js in 1_data.lua and replace it with display.js.
Here is a summary of the changes that I made to 1_data.lua to reflect the use of display.js
Replace the code snippet in the first column with the code snippet on the second column.
Original using gfx.js Changed to display.js
require 'gfx.js'
disp=require 'display'
gfx.image(first256Samples_y, {legend='Y'})
disp.image(first256Samples_y, {title='Y'})
gfx.image(first256Samples_u, {legend='U'})
disp.image(first256Samples_u, {title='U'})
gfx.image(first256Samples_v, {legend='V'})
disp.image(first256Samples_v, {title='V'})
Here is the modified 1_data.lua for your reference.
Run this command $ th -i 1_data.lua
原文地址:http://ml4ma.blogspot.com/2015/01/supervised-learning-using-torch7.html
0 0
- Torch7安装gfx.js出错
- torch7-- errors using gfx in the tutorial--Cannot find module 'pty.js'--[gfx.js] rendering cell
- Torch7安装
- Torch7安装
- torch7 require"cutorch" 出错解决办法
- torch7安装方法
- centos7下安装Torch7
- torch7的安装
- Torch7.0安装
- [Torch7]的安装
- [Torch7]的安装
- [Torch7]的安装
- Torch7的安装
- Torch7
- Torch7
- Ubuntu14.04安装torch7笔记
- 在Ubuntu下安装torch7
- Torch7+Ubuntu14.04+CPU安装
- ios-GPUImage框架中,图片保存后图片右偏90度
- 为什么你要写博客?
- Android Lint工具 优化代码 <12>
- UIWebView
- 一张图道尽程序员的出路
- Torch7安装gfx.js出错
- 由DOS格式引出的shell脚本问题
- IOS
- Git学习之上传本地代码到github
- 将来一定要开发一个好软件!
- AngularJS进阶(二十八)解决AngualrJS页面刷新导致异常显示问题
- 内存分配器三
- 如何在iPhone手机里创建网页快捷方式图标(Web Clip)
- 单层感知机