前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >使用torch时安装cunn和cutorch失败的解决方法

使用torch时安装cunn和cutorch失败的解决方法

作者头像
村雨遥
发布2019-11-25 23:05:59
2K0
发布2019-11-25 23:05:59
举报
文章被收录于专栏:JavaParkJavaParkJavaPark
  • 系统:Ubuntu
  • 安装torch
  • 安装GPU支持
  • cutorch安装
  • cunn安装

安装torch

系统:Ubuntu

安装torch

$ curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash
$ git clone https://github.com/torch/distro.git ~/torch --recursive # install in your "home","/home/usrname", and you can change it if you want
$ cd ~/torch;
$ ./install.sh      # and enter "yes" at the end to modify your bashrc
$ source ~/.bashrc

安装GPU支持

$ luarocks install cutorch
$ luarocks install cunn

问题

当安装GPU支持时,可能出现如下错误:

Error: No results matching query were found.

解决方案

使用源码安装,需要先安装cutorch,因为cunn的安装依赖于cutorch;

cutorch安装

$ git clone git://github.com/torch/cutorch.git
$ luarocks install cutorch/rocks/cutorch-scm-1.rockspec

cunn安装

git clone https://github.com/torch/cunn
luarocks make cunn/rocks/cunn-scm-1.rockspec

总结

通过上述安装方法,可以解决无法安装cutorchcunn的情况;

本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2019-11-21,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 村雨遥 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 安装torch
    • 系统:Ubuntu
      • 安装torch
        • 安装GPU支持
        • 问题
        • 解决方案
          • cutorch安装
            • cunn安装
            • 总结
            领券
            问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档