当前位置:网站首页>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
边栏推荐
- mysql中 innoDB执行过程分析
- 5 free audio material websites, recommended collection
- About the 'enum' enumeration type and structure.
- 【csnote】ER图
- mysql8安装
- The continuous construction of the Internet industry platform is not only able to collect traffic
- Start mqbroker CMD failure resolution
- The quill editor image zooms, multiple rich text boxes are used on one page, and the quill editor upload image address is the server address
- Kubernets Getting started tutoriel
- Custom nail robot alarm
猜你喜欢
Use compressorjs to compress pictures, optimize functions, and compress pictures in all formats
There is no need to crack the markdown editing tool typora
5 free audio material websites, recommended collection
Calculate the past date and days online, and calculate the number of live days
云原生KubeSphere部署Redis
教你快速开发一个 狼人杀微信小程序(附源码)
[vulnhub range] - DC2
Unlock openharmony technology day! The annual event is about to open!
About the 'enum' enumeration type and structure.
进程虚拟地址空间区域划分
随机推荐
About the 'enum' enumeration type and structure.
Navicat远程连接数据库 出现 1130- Host xxx is not allowed to connect to this MySQL server错误
云原生KubeSphere部署Mysql
The accuracy and speed are perfectly balanced, and the latest image segmentation SOTA model is released!!!
How to click an object to play an animation
CGC: contractual graph clustering for community detection and tracking
Go language mapping operation
C, calculation code of parameter points of two-dimensional Bezier curve
Golang realizes regular matching: the password contains at least one digit, letter and special character, and the length is 8-16
标签与路径
Analysis of InnoDB execution process in MySQL
BUUCTF WEB [BUUCTF 2018]Online Tool
Record some NPM related problems (messy records)
What are the forms of attack and tampering on the home page of the website
实现一个盒子在父盒子中水平垂直居中的几种“姿势”
Resolve disagrees about version of symbol device_ create
If you were a golang interviewer, what questions would you ask?
Packet capturing and sorting -- TCP protocol [8]
Van uploader upload picture implementation process, using native input to upload pictures
There is no need to crack the markdown editing tool typora