Torch 的安装与基本用法
本文安装仅限 ubuntu 系统。官方文档见:Getting started with Torch。
0. 简介
- Torch 使用轻量级脚本语言 Lua 及其 C/CUDA 扩展模块实现,底层数值计算通过高效的 OpenMP/SSE/CUDA 加速;
1. 安装
进入命令行终端,分别执行下面三行的代码,
git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch; bash install-deps;
./install.sh
install.sh脚本会自动将 torch 路径添加进 Path 变量,因此还需执行下述代码以刷新环境变量。
# On Linux with bash
source ~/.bashrc
# On Linux with zsh
source ~/.zshrc
# On OSX or in Linux with none of the above.
source ~/.profile
2. 安装第三方库
- $ luarocks list:查看已安装库;
- $ luarocks install image:安装
image库;
- $ luarocks list:再次查看是否已安装 image 库;
3. torch 命令行环境
在 ubuntu 命令行输入 th以进入 torch 的 repl (read-eval-print loop)环境。
$ th
______ __ | Torch7
/_ __/__ ________/ / | Scientific computing for Lua.
/ / / _ \/ __/ __/ _ \ | Type ? for help
/_/ \___/_/ \__/_//_/ | https://github.com/torch
| http://torch.ch
th> os.exit():退出;
Torch 的安装与基本用法的更多相关文章
- 理解Docker(1):Docker 安装和基础用法
本系列文章将介绍Docker的有关知识: (1)Docker 安装及基本用法 (2)Docker 镜像 (3)Docker 容器的隔离性 - 使用 Linux namespace 隔离容器的运行环境 ...
- CentOS安装rar及用法
1.下载安装rar wget http://www.rarsoft.com/rar/rarlinux-x64-5.4.b3.tar.gztar -zxvf rarlinux-x64-.tar.gz - ...
- Torch的安装和学习
Long long ago, 就已经安装好Torch,这里再记录一下.Torch是Facebook开发的用于AI的科学计算框架,可广泛运用于机器学习的很多算法.相比Caffe,其接口运用更加方便,使用 ...
- Docker 安装和基础用法
理解Docker(1):Docker 安装和基础用法 本系列文章将介绍Docker的有关知识: (1)Docker 安装及基本用法 (2)Docker 镜像 (3)Docker 容器的隔离性 - 使用 ...
- git安装及基本用法
安装: 1先安装客户端,选择默认路径,直接下一步就可以了 2安装图形化客户端,选择默认路径安装完成 基本用法: 1同步coding上的文件 在桌面上点击鼠标右键,并选择Git Clone... 打开下 ...
- [Torch]的安装
1 安装Torch 本文介绍Torch7的安装方法,因为本人安装Torch前安装了caffe,所以可能CUDA.cudnn.Blas等Torch可能需要用来的库的安装就不再重复介绍了,相关依赖出现问题 ...
- Mac安装brew及其用法
Mac 安装 brew 及其用法: 安装brew: curl -LsSf http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz - ...
- 火焰图(Flame Graphs)的安装和基本用法
火焰图(Flame Graphs) 一.概述: 火焰图(flame graph)是性能分析的利器,通过它可以快速定位性能瓶颈点. perf 命令(performance 的缩写)是 Linux 系统原 ...
- pytorch安装及基本用法
20180425更新 安装pytorch0.4.0: conda uninstall pytorch # 如果是CUDA版本的话 conda uninstall cuda80 cuda90 # 如果 ...
随机推荐
- ZooKeeper Recipes and Solutions
原文地址:http://zookeeper.apache.org/doc/current/recipes.html 参考:https://zookeeper.apache.org/doc/trunk/ ...
- sqoop配置安装以及导入
安装sqoop的前提是已经具备java和hadoop的环境 1.上传并解压 (要导mysql的数据)得加入mysql的jdbc驱动包 接下来验证启动 Sqoop的数据导入 “导入工具”导入单个表从RD ...
- 为什么在input中加了display:inline;再加宽,还有作用?
以前一直一位input是个行内元素,但是,行内元素的特性就是没有宽高的概念,元素多高,多宽,全凭内容撑起来的. 但是今天写了个demo,用chrome控制台显示:display:inline-bloc ...
- Maven(一)之Maven入门
一.Maven简介 Maven可以翻译为“知识的积累”.“专家”.“内行”.作为Apache组织中的一个颇为成功的开源项目,Maven主要服务于基于Java平台的项目构建.依赖管理.和项目信息管理.M ...
- package.json 中 scripts
"name": "webpack-study1", "version": "1.0.0", "main&quo ...
- oracle 12c 关于wm_concat 的替换;LISTAGG
之所以用到了wm_concat函数.是想到达这样的结果集. 转为这样的===========> 返回这样的数据,易与配合echarts的数据准备. 看上去十分的方便,但是遗憾的是,oracle极 ...
- django-xadmin使用之更改菜单url
环境:xadmin-for-python3 python3.5.2 django1.9.12 1. 在模块的adminx.py文件中增加以下代码: class AdminSettings(object ...
- 网页加速之Chromium 预载入 Prerendering
前一篇博文已经介绍通过prefetch预先载入网页的资源来提升网页载入速度,以下我们一起来看一下网页加速之chromium prerendering.在介绍prerendering之前,先介绍两个概念 ...
- Docker Network Configuration 高级网络配置
Network Configuration TL;DR When Docker starts, it creates a virtual interface named docker0 on the ...
- 7.第一次使用java连接mongodb遇到的问题
转自:https://blog.csdn.net/u010523770/article/details/54585883 新版本的mongodb的驱动包是依赖bson.jar和mongodb_driv ...