misc: Fix comment in op_node_proto_helper (#460)

* Fix comment in op_node_proto_helper

* PR feedback
This commit is contained in:
Hariharan Seshadri 2019-02-11 14:38:43 -08:00 committed by GitHub
parent 88949485ff
commit fdd71574d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,13 +37,14 @@ class OpNodeProtoHelper {
/**
Get a single attribute
Call this function for a required attribute or when a default value for an optional attribute is specified in the op schema
*/
template <typename T>
MUST_USE_RESULT Status GetAttr(const std::string& name, T* value) const;
/**
Get a single attribute
Call this function only when onnx doesn't have default value
Call this function only when a default value for an optional attribute isn't specified in the op schema
*/
template <typename T>
T GetAttrOrDefault(const std::string& name, const T& default_value) const {
@ -53,7 +54,7 @@ class OpNodeProtoHelper {
/**
Get a single attribute
Call this function only when onnx doesn't have default value
Call this function only when a default value for an optional attribute isn't specified in the op schema
*/
template <typename T>
void GetAttrOrDefault(const std::string& name, T* value, const T& default_value) const {
@ -63,7 +64,7 @@ class OpNodeProtoHelper {
/**
Get repeated attributes
Call this function only when onnx doesn't have default value
Call this function only when a default value for an optional attribute isn't specified in the op schema
*/
template <typename T>
MUST_USE_RESULT std::vector<T> GetAttrsOrDefault(const std::string& name, const std::vector<T>& default_value = std::vector<T>{}) const {