• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

oxford-cs-ml-2015/practical1: Practical 1: Introduction to lua and torch

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

oxford-cs-ml-2015/practical1

开源软件地址(OpenSource Url):

https://github.com/oxford-cs-ml-2015/practical1

开源编程语言(OpenSource Language):

Shell 100.0%

开源软件介绍(OpenSource Introduction):

Practical 1

Machine Learning, spring 2015

NOTE: if you are not reading this from an Oxford CS lab machine, install-torch.sh will be completely useless. Please use the official installation route instead: https://github.com/torch/ezinstall.

Setup

Most of the lab machines will have Torch precompiled and stored in /home/scratch/torchshared/torch. This will speed up installation as the install script (install-torch.sh) will detect this automatically and install if so. If you prefer to force the script to download from the internet and not use this directory, which takes longer, you may modify the script yourself. You may install Torch on your personal machine if you like, though due to time constraints and varying system configurations we are unable to support this.

Clone the git repository somewhere and cd into it, and run the installation script, which is only intended to be run on the lab machines:

$ git clone https://github.com/oxford-cs-ml-2015/practical1.git
$ cd practical1
$ bash install-torch.sh

It will prompt you to ask if you want to copy the torch installation if it exists, or automatically continue to download if it doesn't exist, in which case setup will take around 5 minutes. In either case, the installation target is the machine's local disk (/home/scratch), so you will need to run the script every time you use a different lab machine. You may continue to save your work to your networked home directory, of course.

You should read the practical PDF document as you wait.

After installation completes, the install script will direct you to add Torch to your PATH environment variable:

$ export PATH=/home/scratch/$USER/torch/bin:$PATH

You may add this line to your ~/.bash_environment. Now you can start an interactive LuaJIT session with Torch loaded using:

$ th
 
  ______             __   |  Torch7                                   
 /_  __/__  ________/ /   |  Scientific computing for Lua.         
  / / / _ \/ __/ __/ _ \  |                                           
 /_/  \___/_/  \__/_//_/  |  https://github.com/torch   
                          |  http://torch.ch            
	
th> a=0 ; b=1
                                                                      [0.0001s]	
th> a+b
1	
                                                                      [0.0001s]	
th> torch.randn(2,2)
 0.0341  0.0868
-1.8843  0.9053
[torch.DoubleTensor of dimension 2x2]
...

IMPORTANT NOTE: the script will attempt to install IPython 2.x along with its dependencies if you have a version older than 2.2, which should be the case for most of you. If you do not wish for the script to upgrade IPython, edit the script and comment out the IPython portion for now. We will only need it in a later practical.

See course page for practicals

https://www.cs.ox.ac.uk/people/nando.defreitas/machinelearning/




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap