了解Torch。
  • Torch的目标是在建立科学算法的同时,要有最大的灵活度与速度,而这一过程非常简单,Torch拥有一个大社区驱动包的生态系统,设计机器学习,计算机视觉、信号处理、并行处理、图像、视频、音频和网络等,并建立在Lua社区基础之上。
  • Torch的核心是流行的神经网络和优化库,他们易于使用,同时是在实现复杂的神经网络扩扑图结构时具有最大的灵活性,你可以建立任何的神经网络图,并在CPU和GPUs上有效并行化。

在Ubuntu上安装git工具

  • 通过Ctrl+Alt+T打开终端,在终端输入git,如果出现下面提示:
    Python笔记--Torch环境的搭建
  • 出现以上内容则,git没有安装,在终端输入sudo apt install git,即可以进行安装。
  • 出现:Could not get lock /var/lib/dpkg/lock 问题点击这里。

Torch 的安装

git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch; 
bash install-deps;
./install.sh
  • 经过漫长的等待后,安装完成,需要刷新环境变量.。
source ~/.bashrc
  • 直接在命令行中输入th命令测试安装是否成功。
  • 成功结果如下:
$ th

  ______             __   |  Torch7                                   
 /_  __/__  ________/ /   |  Scientific computing for Lua.         
  / / / _ \/ __/ __/ _ \  |                                           
 /_/  \___/_/  \__/_//_/  |  https://github.com/torch   
                          |  http://torch.ch            

th> torch.Tensor{1,2,3}
 1
 2
 3
[torch.DoubleTensor of dimension 3]

th>

相关文章:

  • 2021-08-08
  • 2021-07-13
  • 2021-09-14
  • 2022-01-14
  • 2021-11-01
  • 2021-06-07
  • 2021-11-05
  • 2021-11-13
猜你喜欢
  • 2021-10-01
  • 2021-10-15
  • 2021-12-08
  • 2021-07-25
  • 2021-12-11
  • 2021-07-19
相关资源
相似解决方案