| 57 | } |
| 58 | |
| 59 | static std::vector<TensorProto> ExtractTensors(const AttrValue& attr_value) { |
| 60 | std::vector<TensorProto> tensors; |
| 61 | switch (attr_value.value_case()) { |
| 62 | case AttrValue::kTensor: { |
| 63 | tensors.push_back(attr_value.tensor()); |
| 64 | break; |
| 65 | } |
| 66 | case AttrValue::kList: { |
| 67 | for (const auto& tensor_proto : attr_value.list().tensor()) { |
| 68 | tensors.push_back(tensor_proto); |
| 69 | } |
| 70 | break; |
| 71 | } |
| 72 | default: { |
| 73 | } |
| 74 | } |
| 75 | return tensors; |
| 76 | } |
| 77 | |
| 78 | // Annotate the op_info inputs with extra information when possible (e.g. the |
| 79 | // input value if it's known statically). |
no test coverage detected