Commit 1ba443a4 by Chang Lan Committed by Tianqi Chen

Use unsafe_get in nnvm (#2247)

parent d1a0c901
Subproject commit 4d49691f1a9d944c3b0aa5e63f1db3cad1f941f8
Subproject commit 519d013a213c0c447a971f51219473ef564d2348
......@@ -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
......
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment