Use unsafe_get in nnvm (#2247)
This commit is contained in:
Родитель
d1a0c90106
Коммит
1ba443a4fe
|
@ -1 +1 @@
|
|||
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 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче