当前位置:网站首页>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
githubThe address cannot be downloaded . We are github On the searchpaths, eureka Reference link 2 The address of , Will the wholetorch/pathsDownload the project (paths-master.zip file) . And then useunzip paths-master.zipunpack . - Get into
paths-masterCatalog , 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
rocksTwo 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 3Installation of depends onlink 4, So let's installlink 4Mediumcwrap-scm-1.rockspec).

-
You can pull... From the command line
urlField , You can also enter... In the browserhomepageField to download . -
When the download is complete ( See
Various required documentsMediumcwrap-master.zipfile ). Unzip and entercwrap-masterFolder , Enter the command
sudo luarocks make rocks/cwrap-scm-1.rockspec
As follows , installation is complete

- The same operation gets
Reference link 3Mediumtorch-scm-1.rockspecSource code ( SeeVarious required documentsMediumtorch7-master.zipfile ). Unzip and entertorch7-masterFolder , 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.rockspecAddress input browser , We can see its source code address .

-
You can also get the source code in two ways ( See
Various required documentsMediumgraph-master.zipfile ). download 、 decompression 、 Get intograph-masterDirectory and execute the command .
sudo luarocks make rocks/graph-scm-1.rockspec
-
installation is complete

-
Find... In the same way
nngraphThe download address for ishttps://github.com/torch/nngraphorgit://github.com/torch/nngraph. -
Will download good files ( Or see
Various required documentsMediumnngraph-master.zipfile ) Unzip intonngraph-masterCatalog , Usemkdir rocksCreate folder , And newrocks/nngraph-scm-1.rockspecfile , 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-masterExecute under directory
sudo luarocks make rocks/nngraph-scm-1.rockspec
install , The installation results are as follows

test
- Use
luaInteractive environment runningrequire 'nngraph'when , The following errors will be reported .

- Use
lua5.1Interactive 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
边栏推荐
- After the data of El table is updated, the data in the page is not updated this$ Forceupdate() has no effect
- [csnote] ER diagram
- How to prevent the website from being hacked and tampered with
- 21 天学习MongoDB笔记
- Start mqbroker CMD failure resolution
- The continuous construction of the Internet industry platform is not only able to collect traffic
- Trier les principales utilisations de l'Agent IP réseau
- BUUCTF WEB [BJDCTF2020]ZJCTF,不过如此
- What are the forms of attack and tampering on the home page of the website
- There is no need to crack the markdown editing tool typora
猜你喜欢

拥抱机器视觉新蓝海,冀为好望开启数字经济发展新“冀”遇

HQL find the maximum value in a range

Record the problems encountered in using v-print

Free and open source agricultural Internet of things cloud platform (version: 3.0.1)

V-model binding value in El select, data echo only displays value, not label

在线计算过往日期天数,计算活了多少天
![[vulnhub range] - DC2](/img/b7/c34f69a231dad653b8a912f1f36bef.png)
[vulnhub range] - DC2

Huawei cloud MVP email

精度、速度完美平衡,最新图像分割SOTA模型重磅发布!!!

风尚云网学习-input属性总结
随机推荐
Baserecyclerviewadapterhelper realizes pull-down refresh and pull-up loading
Common problems of unity (1)
How to click an object to play an animation
mysql支持ip访问
Homomorphic encryption technology learning
SSM framework series - JUnit unit test optimization day2-3
Web17——EL与JSTL的使用
STM32 project transplantation: transplantation between chip projects of different models: Ze to C8
Golang implements MD5, sha256 and bcrypt encryption
【csnote】ER图
Recovering data with MySQL binlog
Go language: passing slices between functions
STM32 control stepper motor (ULN2003 + 28byj)
解决disagrees about version of symbol device_create
Object. The disorder of key value array after keys
mysql8安装
Object.keys后key值数组乱序的问题
Free and open source charging pile Internet of things cloud platform
Huawei cloud MVP email
软件测试周刊(第68期):解决棘手问题的最上乘方法是:静观其变,顺水推舟。