Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
1ba443a4
Commit
1ba443a4
authored
Dec 06, 2018
by
Chang Lan
Committed by
Tianqi Chen
Dec 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use unsafe_get in nnvm (#2247)
parent
d1a0c901
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
3rdparty/dmlc-core
+1
-1
nnvm/include/nnvm/base.h
+3
-0
nnvm/include/nnvm/graph.h
+1
-1
No files found.
dmlc-core
@
519d013a
Subproject commit
4d49691f1a9d944c3b0aa5e63f1db3cad1f941f
8
Subproject commit
519d013a213c0c447a971f51219473ef564d234
8
nnvm/include/nnvm/base.h
View file @
1ba443a4
...
...
@@ -25,6 +25,9 @@ using dmlc::array_view;
/*!\brief getter function of any type */
using
dmlc
::
get
;
/*!\brief "unsafe" getter function of any type */
using
dmlc
::
unsafe_get
;
}
// namespace nnvm
// describe op registration point
...
...
nnvm/include/nnvm/graph.h
View file @
1ba443a4
...
...
@@ -229,7 +229,7 @@ inline const T& Graph::GetAttr(const std::string& attr_name) const {
auto
it
=
attrs
.
find
(
attr_name
);
CHECK
(
it
!=
attrs
.
end
())
<<
"Cannot find attribute "
<<
attr_name
<<
" in the graph"
;
return
nnvm
::
get
<
T
>
(
*
it
->
second
);
return
nnvm
::
unsafe_
get
<
T
>
(
*
it
->
second
);
}
inline
bool
Graph
::
HasAttr
(
const
std
::
string
&
attr_name
)
const
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment