| 139 | } |
| 140 | |
| 141 | tensorflow::Status CheckOptionalAttr(const NodeDef& node, |
| 142 | const string& attr_name, |
| 143 | const string& expected_value) { |
| 144 | if (HasAttr(node, attr_name)) { |
| 145 | const string& value = GetStringAttr(node, attr_name); |
| 146 | if (value != expected_value) { |
| 147 | return tensorflow::errors::InvalidArgument( |
| 148 | "Unexpected value for attribute '" + attr_name + "'. Expected '" + |
| 149 | expected_value + "'"); |
| 150 | } |
| 151 | } |
| 152 | return tensorflow::Status::OK(); |
| 153 | } |
| 154 | |
| 155 | tensorflow::Status CheckOptionalAttr( |
| 156 | const NodeDef& node, const string& attr_name, |
no test coverage detected