当前位置:网站首页>Install nngraph
Install nngraph
2022-04-23 12:58:00 【Cheap sword】
Reference link
- Reference link 1: https://github.com/torch/nngraph/issues/52
- Reference link 2: https://github.com/torch/paths/blob/master/rocks/paths-scm-1.rockspec
- Reference link 3: https://github.com/torch/rocks/blob/master/torch-scm-1.rockspec
- Reference link 4: https://github.com/torch/rocks/blob/master/cwrap-scm-1.rockspec
Various required documents
1. torch7-master.zip
2. paths-master.zip
3. nngraph-master.zip
4. graph-master.zip
5. cwrap-master.zip
problem
stay Ubuntu18.04 Up operation lua The code encountered a lack of nngraph The problem of , Various google Can't find , Only Reference link 1 Kind of Clue . The solution given in the link is as follows
sudo luarocks --from=https://raw.githubusercontent.com/torch/rocks/master/ install nngraph
This solution is in 2015 Proposed at the end of the year , Now, due to safety reasons, the following problems are reported . But this error tip gives us a little clue to solve the problem .
Solution
- The one in the middle of the error prompt
github
The address cannot be downloaded . We are github On the searchpaths
, eureka Reference link 2 The address of , Will the wholetorch/paths
Download the project (paths-master.zip file
) . And then useunzip paths-master.zip
unpack . - Get into
paths-master
Catalog , Use
sudo luarocks make rocks/paths-scm-1.rockspec
Command to compile and install . The final result is as follows
- Go ahead with the order
sudo luarocks --from=https://raw.githubusercontent.com/torch/rocks/master/ install nngraph
The following errors are still found
This time we will torch-scm-1.rockspec
( Reference link 3) and cwrap-scm-1.rockspec
( Reference link 4) With the installation .
-
link 3 And link 4 It shows a lot of
rocks
Two of them , There is no source code . Therefore, it cannot be installed through source code compilation , Check the content carefully , We found its source code address ( becauselink 3
Installation of depends onlink 4
, So let's installlink 4
Mediumcwrap-scm-1.rockspec
).
-
You can pull... From the command line
url
Field , You can also enter... In the browserhomepage
Field to download . -
When the download is complete ( See
Various required documents
Mediumcwrap-master.zip
file ). Unzip and entercwrap-master
Folder , Enter the command
sudo luarocks make rocks/cwrap-scm-1.rockspec
As follows , installation is complete
- The same operation gets
Reference link 3
Mediumtorch-scm-1.rockspec
Source code ( SeeVarious required documents
Mediumtorch7-master.zip
file ). Unzip and entertorch7-master
Folder , Carry out orders
sudo luarocks make rocks/torch-scm-1.rockspec
It's a time-consuming process , Wait patiently for the command to run . The final results are as follows
- Go ahead with the order
sudo luarocks --from=https://raw.githubusercontent.com/torch/rocks/master/ install nngraph
See what's missing .
-
Sure enough, there are still missing files , We install... From bottom to top
-
take
grap-scm-1.rockspec
Address input browser , We can see its source code address .
-
You can also get the source code in two ways ( See
Various required documents
Mediumgraph-master.zip
file ). download 、 decompression 、 Get intograph-master
Directory and execute the command .
sudo luarocks make rocks/graph-scm-1.rockspec
-
installation is complete
-
Find... In the same way
nngraph
The download address for ishttps://github.com/torch/nngraph
orgit://github.com/torch/nngraph
. -
Will download good files ( Or see
Various required documents
Mediumnngraph-master.zip
file ) Unzip intonngraph-master
Catalog , Usemkdir rocks
Create folder , And newrocks/nngraph-scm-1.rockspec
file , The content is
package = "nngraph"
version = "scm-1"
source = {
url = "git://github.com/torch/nngraph",
tag = "master"
}
description = {
summary = "This package provides graphical computation for nn library in Torch7.",
homepage = "https://github.com/torch/nngraph",
license = "UNKNOWN"
}
dependencies = {
"torch >= 7.0",
"graph",
"nn"
}
build = {
type = "command",
build_command = [[
cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$(LUA_BINDIR)/.." -DCMAKE_INSTALL_PREFIX="$(PREFIX)" && $(MAKE)
]],
install_command = "cd build && $(MAKE) install"
}
- stay
nngraph-master
Execute under directory
sudo luarocks make rocks/nngraph-scm-1.rockspec
install , The installation results are as follows
test
- Use
lua
Interactive environment runningrequire 'nngraph'
when , The following errors will be reported .
- Use
lua5.1
Interactive environment runningrequire 'nngraph'
when , The following errors will be reported .
These are two completely different mistakes , Next, study how to solve .
版权声明
本文为[Cheap sword]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231257262850.html
边栏推荐
- 实现一个盒子在父盒子中水平垂直居中的几种“姿势”
- 4.DRF 权限&访问频率&过滤&排序
- 解决disagrees about version of symbol device_create
- Go language: passing slices between functions
- Kubernets Getting started tutoriel
- 世界读书日:我想推荐这几本书
- About the 'enum' enumeration type and structure.
- Introducing vant components on demand
- There is no need to crack the markdown editing tool typora
- 22. 括号生成
猜你喜欢
How to prevent the website from being hacked and tampered with
拥抱机器视觉新蓝海,冀为好望开启数字经济发展新“冀”遇
Summary of JVM knowledge points - continuously updated
精度、速度完美平衡,最新图像分割SOTA模型重磅发布!!!
云原生KubeSphere部署Redis
Software testing weekly (issue 68): the best way to solve difficult problems is to wait and see the changes and push the boat with the current.
在线计算过往日期天数,计算活了多少天
[vulnhub range] - DC2
【csnote】ER图
Recovering data with MySQL binlog
随机推荐
SSM框架系列——注解开发day2-2
Subscribe to Alibaba demo send business messages
HQL statement tuning
21 days learning mongodb notes
实现一个盒子在父盒子中水平垂直居中的几种“姿势”
Golang implements a five insurance and one gold calculator with web interface
SSM框架系列——Junit单元测试优化day2-3
(1) Openjuterpyrab comparison scheme
SSM framework series - data source configuration day2-1
Redis deployment of cloud native kubesphere
风尚云网学习-input属性总结
CGC: contractual graph clustering for community detection and tracking
Kubernets Getting started tutoriel
梳理网络IP代理的几大用途
免费试用一个月的服务器,并附上教程
标签与路径
unity常见的问题(一)
Mysql8 installation
leetcode-791. 自定义字符串排序
产品开发都应该知道的8个网站,增强工作体验